Skip to content

Commit 8de72f1

Browse files
Build script updates for syncing engine sources and building artifacts on linux-arm64 (#186917)
#182552 added support in the Flutter tools for using a version of gen_snapshot that runs on linux-arm64 hosts and targets Android devices. However, the engine build infrastructure is not currently set up to build this kind of gen_snapshot binary. This PR contains changes needed to build engine artifacts on linux-arm64 machines. With this PR a linux-arm64 build environment can: * run "gclient sync" * build targets like zip_archives/android-arm64-profile/linux-arm64.zip that were added in #182552
1 parent f3a4b98 commit 8de72f1

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎DEPS‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ vars = {
107107
# logic or condition may not work if this flag is False.
108108
# TODO(zijiehe): Make this condition more strict to only download fuchsia
109109
# dependencies when necessary: b/40935282
110-
'download_fuchsia_deps': 'host_os == "linux"',
110+
'download_fuchsia_deps': 'host_os == "linux" and host_cpu == "x64"',
111111
# Downloads the fuchsia SDK as listed in fuchsia_sdk_path var. This variable
112112
# is currently only used for the Fuchsia LSC process and is not intended for
113113
# local development.
@@ -634,6 +634,7 @@ deps = {
634634
'version': 'version:21'
635635
}
636636
],
637+
'condition': 'not (host_os == "linux" and host_cpu == "arm64")',
637638
# Always download the JDK since java is required for running the formatter.
638639
'dep_type': 'cipd',
639640
},

‎engine/src/build/config/BUILDCONFIG.gn‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,7 @@ if (custom_toolchain != "") {
566566
set_default_toolchain("//build/toolchain/win:clang_$current_cpu")
567567
} else if (is_android) {
568568
if (host_os == "linux") {
569-
# Use clang for the x86/64 Linux host builds.
570-
if (host_cpu == "x86" || host_cpu == "x64") {
571-
host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
572-
} else {
573-
host_toolchain = "//build/toolchain/linux:$host_cpu"
574-
}
569+
host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
575570
} else if (host_os == "mac") {
576571
host_toolchain = "//build/toolchain/mac:clang_$host_cpu"
577572
} else if (host_os == "win") {

‎engine/src/build/toolchain/android/BUILD.gn‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ template("android_toolchain") {
7272
assert(invoker.is_clang)
7373
host_dir = ""
7474
if (host_os == "linux") {
75-
host_dir = "linux-x64"
75+
host_dir = "linux-${host_cpu}"
7676
} else if (host_os == "mac") {
7777
host_dir = "mac-${host_cpu}"
7878
} else {

0 commit comments

Comments
 (0)