Remove impeller-cmake build rules (#171407)

We no longer have any stakeholders relying on the impeller-cmake build,
and I am no longer maintaining it.

Developers who wish to use the Impeller renderer in native applications
should consider using the awesome [Impeller Standalone C
SDK](https://github.com/flutter/flutter/tree/master/engine/src/flutter/impeller/toolkit/interop#impeller-standalone-sdk)
built by @chinmaygarde instead.
This commit is contained in:
Brandon DeRosier 2025-06-30 15:57:27 -07:00 committed by GitHub
parent 2c970ccee1
commit 152cbfc2c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 205 deletions

35
DEPS
View File

@ -130,12 +130,6 @@ vars = {
# RBE will be downloaded from CIPD. This option is only usable by Googlers.
'use_rbe': False,
# This is not downloaded be default because it increases the
# `gclient sync` time by between 1 and 3 minutes. This option is enabled
# in flutter/ci/builders/mac_impeller_cmake_example.json, and is likely to
# only be useful locally when reproducing issues found by the bot.
'download_impeller_cmake_example': False,
# Upstream URLs for third party dependencies, used in
# determining common ancestor commit for vulnerability scanning
# prefixed with 'upstream_' in order to be identified by parsing tool.
@ -845,23 +839,6 @@ deps = {
'dep_type': 'cipd',
},
'engine/src/flutter/third_party/impeller-cmake-example': {
'url': Var('flutter_git') + '/third_party/impeller-cmake-example.git' + '@' + '9f8298ec31dcbebbf019bd487888166abf2f55e6',
'condition': 'download_impeller_cmake_example',
},
# cmake is only used by impeller-cmake-example.
'engine/src/flutter/buildtools/mac-x64/cmake': {
'packages': [
{
'package': 'infra/3pp/tools/cmake/mac-amd64',
'version': 'CGpMvZoP962wdEINR9d4OEvEW7ZOv0MPrHNKbBUBS0sC',
}
],
'condition': 'download_impeller_cmake_example and host_os == "mac"',
'dep_type': 'cipd',
},
'engine/src/flutter/third_party/google_fonts_for_unit_tests': {
'packages': [
{
@ -965,18 +942,6 @@ hooks = [
'engine/src/flutter/tools/githooks/setup.py',
]
},
{
'name': 'impeller-cmake-example submodules',
'pattern': '.',
'condition': 'download_impeller_cmake_example',
'action': [
'python3',
'engine/src/flutter/ci/impeller_cmake_build_test.py',
'--path',
'flutter/third_party/impeller-cmake-example',
'--setup',
]
},
{
'name': 'Download Fuchsia system images',
'pattern': '.',

View File

@ -1,138 +0,0 @@
#!/usr/bin/env vpython3
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import subprocess
import sys
# When passed the --setup flag, this script fetches git submodules and other
# dependencies for the impeller-cmake-example. When passed the --cmake flag,
# this script runs cmake on impeller-cmake-example. That will create
# a build output directory for impeller-cmake-example under
# out/impeller-cmake-example, so the build can then be performed with
# e.g. ninja -C out/impeller-cmake-example-out.
SRC_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
def parse_args(argv):
parser = argparse.ArgumentParser(
description='A script that tests the impeller-cmake-example build.',
)
parser.add_argument(
'--cmake',
'-c',
default=False,
action='store_true',
help='Run cmake for impeller-cmake-example.',
)
parser.add_argument(
'--path',
'-p',
type=str,
help='The path to the impeller-cmake-example source.',
)
parser.add_argument(
'--setup',
'-s',
default=False,
action='store_true',
help='Clone the git submodules.',
)
parser.add_argument(
'--verbose',
'-v',
default=False,
action='store_true',
help='Emit verbose output.',
)
parser.add_argument(
'--xcode-symlinks',
default=False,
action='store_true',
help='Symlink the Xcode sysroot to help Goma be successful.',
)
return parser.parse_args(argv)
def validate_args(args):
if not os.path.isdir(os.path.join(SRC_ROOT, args.path)):
print(
'The --path argument must be a valid directory relative to the '
'engine src/ directory.'
)
return False
return True
def create_xcode_symlink():
find_sdk_command = [
'python3',
os.path.join(SRC_ROOT, 'build', 'mac', 'find_sdk.py'),
'--print_sdk_path',
'10.15',
'--symlink',
os.path.join(SRC_ROOT, 'out', 'impeller-cmake-example-xcode-sysroot'),
]
find_sdk_output = subprocess.check_output(find_sdk_command).decode('utf-8')
return find_sdk_output.split('\n')[0]
def main(argv):
args = parse_args(argv[1:])
if not validate_args(args):
return 1
impeller_cmake_dir = os.path.join(SRC_ROOT, args.path)
if args.setup:
git_command = [
'git',
'-C',
impeller_cmake_dir,
'submodule',
'update',
'--init',
'--recursive',
'--depth',
'1',
'--jobs',
str(os.cpu_count()),
]
subprocess.check_call(git_command)
# Run the deps.sh shell script in the repo.
subprocess.check_call(['bash', 'deps.sh'], cwd=impeller_cmake_dir)
return 0
if args.cmake:
cmake_path = os.path.join(SRC_ROOT, 'buildtools', 'mac-x64', 'cmake', 'bin', 'cmake')
cmake_command = [
cmake_path,
'--preset',
'flutter-ci-mac-debug-x64',
'-B',
os.path.join(SRC_ROOT, 'out', 'impeller-cmake-example'),
]
cmake_env = os.environ.copy()
ninja_path = os.path.join(SRC_ROOT, 'flutter', 'third_party', 'ninja')
cmake_env.update({
'PATH': os.environ['PATH'] + ':' + ninja_path,
'FLUTTER_ENGINE_SRC_DIR': SRC_ROOT,
})
if args.xcode_symlinks:
xcode_symlink_path = create_xcode_symlink()
cmake_env.update({
'FLUTTER_OSX_SYSROOT': xcode_symlink_path,
})
subprocess.check_call(cmake_command, env=cmake_env, cwd=impeller_cmake_dir)
return 0
if __name__ == '__main__':
sys.exit(main(sys.argv))

View File

@ -865,28 +865,6 @@ def to_gn_wasm_args(args, gn_args):
gn_args['flutter_prebuilt_dart_sdk'] = True
def run_impeller_cmake(args):
impeller_cmake_dir = os.path.join('flutter', 'third_party', 'impeller-cmake-example')
if not os.path.isdir(os.path.join(SRC_ROOT, impeller_cmake_dir)):
print('The Impeller cmake example directory "{}" does not exist'.format(impeller_cmake_dir))
return 1
cmake_cmd = [
'python3',
os.path.join(SRC_ROOT, 'flutter', 'ci', 'impeller_cmake_build_test.py'),
'--path',
impeller_cmake_dir,
'--cmake',
]
if args.xcode_symlinks:
cmake_cmd = cmake_cmd + ['--xcode-symlinks']
try:
cmake_call_result = subprocess.call(cmake_cmd, cwd=SRC_ROOT)
except subprocess.CalledProcessError as exc:
print('Failed to generate cmake files: ', exc.returncode, exc.output)
return 1
return cmake_call_result
def parse_args(args):
args = args[1:]
parser = argparse.ArgumentParser(description='A script to run `gn gen`.')
@ -1198,13 +1176,6 @@ def parse_args(args):
parser.add_argument('--malioc-path', type=str, help='The path to the malioc tool.')
parser.add_argument(
'--impeller-cmake-example',
default=False,
action='store_true',
help='Do not run GN. Instead configure the Impeller cmake example build.',
)
parser.add_argument(
'--slimpeller',
default=False,
@ -1274,9 +1245,6 @@ def main(argv):
args = parse_args(argv)
validate_args(args)
if args.impeller_cmake_example:
return run_impeller_cmake(args)
exe = '.exe' if sys.platform.startswith(('cygwin', 'win')) else ''
command = [