forked from firka/flutter
Reverts "Refactors RBE support" (flutter/engine#49654)
Reverts flutter/engine#49416 Initiated by: zanderso This change reverts the following previous change: Original Description: This PR refactors the RBE build and adds support for mac-hosted builds to use RBE. In particular, configurations files are downloaded from flutter-internal CIPD instead of being included in the repo. The download from CIPD is triggered by the presence of the `use_rbe` flag as a custom var in the `.gclient` file. This PR also turns on RBE for Linux and macOS builds that do not produce artifacts. https://github.com/flutter/buildroot/pull/807
This commit is contained in:
5
engine/src/flutter/.gitignore
vendored
5
engine/src/flutter/.gitignore
vendored
@@ -130,9 +130,4 @@ app.*.symbols
|
||||
|
||||
# Prebuilt binaries.
|
||||
/prebuilts/
|
||||
|
||||
# GN build support for protobufs vended by Fuchsia.
|
||||
/build/secondary/third_party/protobuf
|
||||
|
||||
# RBE support configurations and scripts vended from CIPD
|
||||
/build/rbe
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
"kvm=1",
|
||||
"cores=8"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"use_rbe": true
|
||||
},
|
||||
"gn": [
|
||||
"--android",
|
||||
"--android-cpu=x64",
|
||||
@@ -72,9 +69,6 @@
|
||||
"kvm=1",
|
||||
"cores=8"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"use_rbe": true
|
||||
},
|
||||
"gn": [
|
||||
"--android",
|
||||
"--android-cpu=x86",
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
"os=Linux",
|
||||
"cores=32"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"use_rbe": true
|
||||
},
|
||||
"gn": [
|
||||
"--runtime-mode",
|
||||
"debug",
|
||||
@@ -87,9 +84,6 @@
|
||||
"os=Linux"
|
||||
],
|
||||
"dependencies": [],
|
||||
"gclient_variables": {
|
||||
"use_rbe": true
|
||||
},
|
||||
"gn": [
|
||||
"--android",
|
||||
"--embedder-for-target",
|
||||
@@ -118,9 +112,6 @@
|
||||
"version": "last_updated:2023-02-03T15:32:01-0800"
|
||||
}
|
||||
],
|
||||
"gclient_variables": {
|
||||
"use_rbe": true
|
||||
},
|
||||
"gn": [
|
||||
"--android",
|
||||
"--unoptimized",
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
"mac_model=Macmini8,1"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"download_android_deps": false,
|
||||
"use_rbe": true
|
||||
"download_android_deps": false
|
||||
},
|
||||
"gn": [
|
||||
"--runtime-mode",
|
||||
@@ -25,10 +24,7 @@
|
||||
"--unoptimized",
|
||||
"--no-lto",
|
||||
"--prebuilt-dart-sdk",
|
||||
"--enable-impeller-3d",
|
||||
"--rbe",
|
||||
"--no-goma",
|
||||
"--xcode-symlinks"
|
||||
"--enable-impeller-3d"
|
||||
],
|
||||
"name": "host_debug_unopt",
|
||||
"ninja": {
|
||||
@@ -79,18 +75,14 @@
|
||||
"cpu=x86"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"download_android_deps": false,
|
||||
"use_rbe": true
|
||||
"download_android_deps": false
|
||||
},
|
||||
"gn": [
|
||||
"--ios",
|
||||
"--runtime-mode",
|
||||
"debug",
|
||||
"--simulator",
|
||||
"--no-lto",
|
||||
"--rbe",
|
||||
"--no-goma",
|
||||
"--xcode-symlinks"
|
||||
"--no-lto"
|
||||
],
|
||||
"name": "ios_debug_sim",
|
||||
"ninja": {
|
||||
@@ -140,8 +132,7 @@
|
||||
"cpu=arm64"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"download_android_deps": false,
|
||||
"use_rbe": true
|
||||
"download_android_deps": false
|
||||
},
|
||||
"gn": [
|
||||
"--runtime-mode",
|
||||
@@ -151,10 +142,7 @@
|
||||
"--prebuilt-dart-sdk",
|
||||
"--force-mac-arm64",
|
||||
"--mac-cpu",
|
||||
"arm64",
|
||||
"--rbe",
|
||||
"--no-goma",
|
||||
"--xcode-symlinks"
|
||||
"arm64"
|
||||
],
|
||||
"name": "host_debug_unopt_arm64",
|
||||
"ninja": {
|
||||
@@ -193,8 +181,7 @@
|
||||
"cpu=arm64"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"download_android_deps": false,
|
||||
"use_rbe": true
|
||||
"download_android_deps": false
|
||||
},
|
||||
"gn": [
|
||||
"--ios",
|
||||
@@ -204,10 +191,7 @@
|
||||
"--no-lto",
|
||||
"--force-mac-arm64",
|
||||
"--simulator-cpu",
|
||||
"arm64",
|
||||
"--rbe",
|
||||
"--no-goma",
|
||||
"--xcode-symlinks"
|
||||
"arm64"
|
||||
],
|
||||
"name": "ios_debug_sim_arm64",
|
||||
"ninja": {
|
||||
@@ -267,8 +251,7 @@
|
||||
"cpu=arm64"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"download_android_deps": false,
|
||||
"use_rbe": true
|
||||
"download_android_deps": false
|
||||
},
|
||||
"gn": [
|
||||
"--ios",
|
||||
@@ -279,10 +262,7 @@
|
||||
"--force-mac-arm64",
|
||||
"--simulator-cpu",
|
||||
"arm64",
|
||||
"--darwin-extension-safe",
|
||||
"--rbe",
|
||||
"--no-goma",
|
||||
"--xcode-symlinks"
|
||||
"--darwin-extension-safe"
|
||||
],
|
||||
"name": "ios_debug_sim_arm64_extension_safe",
|
||||
"ninja": {
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"os=Linux"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"download_android_deps": false,
|
||||
"use_rbe": true
|
||||
"download_android_deps": false
|
||||
},
|
||||
"gn": [
|
||||
"--runtime-mode",
|
||||
|
||||
@@ -205,6 +205,8 @@ def buildtools_dir():
|
||||
host_cpu = get_host_cpu()
|
||||
if host_os == 'win':
|
||||
host_os = 'windows'
|
||||
if host_os == 'mac' and host_cpu == 'arm64':
|
||||
host_cpu = 'x64'
|
||||
return '%s-%s' % (host_os, host_cpu)
|
||||
|
||||
|
||||
@@ -215,10 +217,9 @@ def setup_rbe(args):
|
||||
if not args.rbe:
|
||||
return rbe_gn_args
|
||||
|
||||
if get_host_os() not in ['linux', 'mac']:
|
||||
if get_host_os() not in ['linux']:
|
||||
print(
|
||||
'The --rbe flag has no effect. RBE is currently only supported on '
|
||||
'macOS and Linux.'
|
||||
'The --rbe flag has no effect. RBE is currently only supported on Linux.'
|
||||
)
|
||||
return rbe_gn_args
|
||||
|
||||
@@ -238,9 +239,7 @@ def setup_rbe(args):
|
||||
)
|
||||
bootstrap_path = os.path.join(cipd_reclient_dir, 'bootstrap')
|
||||
reproxy_path = os.path.join(cipd_reclient_dir, 'reproxy')
|
||||
rbe_cfg_path = os.path.join(
|
||||
SRC_ROOT, 'flutter', 'build', 'rbe', 'reclient.cfg'
|
||||
)
|
||||
rbe_cfg_path = os.path.join(SRC_ROOT, 'build', 'rbe.cfg')
|
||||
bootstrap_cmd = [
|
||||
bootstrap_path,
|
||||
'--re_proxy=' + reproxy_path,
|
||||
@@ -261,20 +260,8 @@ def setup_rbe(args):
|
||||
rbe_gn_args['rbe_dial_timeout'] = args.rbe_dial_timeout
|
||||
if args.rbe_platform:
|
||||
rbe_gn_args['rbe_platform'] = args.rbe_platform
|
||||
|
||||
rbe_gn_args['rbe_dir'] = os.path.join(
|
||||
SRC_ROOT, 'buildtools', buildtools_dir(), 'reclient'
|
||||
)
|
||||
|
||||
rbe_gn_args['rbe_cfg'] = os.path.join(
|
||||
SRC_ROOT, 'flutter', 'build', 'rbe',
|
||||
'rewrapper-' + buildtools_dir() + '.cfg'
|
||||
)
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
if (not running_on_luci or args.xcode_symlinks or
|
||||
os.getenv('FLUTTER_GOMA_CREATE_XCODE_SYMLINKS', '0') == '1'):
|
||||
rbe_gn_args['create_xcode_symlinks'] = True
|
||||
if args.rbe_dir:
|
||||
rbe_gn_args['rbe_dir'] = args.rbe_dir
|
||||
|
||||
return rbe_gn_args
|
||||
|
||||
@@ -298,16 +285,8 @@ def setup_goma(args):
|
||||
# care of starting and stopping the compiler proxy.
|
||||
running_on_luci = os.environ.get('LUCI_CONTEXT') is not None
|
||||
|
||||
# The GOMA client has no arm64 binary, so run the x64 binary through
|
||||
# Rosetta.
|
||||
buildtools_platform = buildtools_dir()
|
||||
if buildtools_platform == 'mac-arm64':
|
||||
buildtools_platform = 'mac-x64'
|
||||
|
||||
# Prefer the goma fetched by gclient if it exists.
|
||||
cipd_goma_dir = os.path.join(
|
||||
SRC_ROOT, 'buildtools', buildtools_platform, 'goma'
|
||||
)
|
||||
cipd_goma_dir = os.path.join(SRC_ROOT, 'buildtools', buildtools_dir(), 'goma')
|
||||
|
||||
# Next, if GOMA_DIR is set, use that install.
|
||||
goma_dir = os.environ.get('GOMA_DIR')
|
||||
|
||||
Reference in New Issue
Block a user