From d9020c648ee01b378390cdfacf5267dd1c18566b Mon Sep 17 00:00:00 2001 From: Hannes Winkler Date: Wed, 11 Aug 2021 13:09:36 +0200 Subject: [PATCH 1/2] don't build flutter SDK artifacts for armv7 --- BUILD.gn | 3 ++- DEPS | 9 +++++++++ tools/gn | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 147cb941532f8..133e091360e32 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -47,7 +47,8 @@ if (flutter_prebuilt_dart_sdk) { # Flutter SDK artifacts should only be built when either doing host builds, or # for cross-compiled desktop targets. _build_engine_artifacts = - current_toolchain == host_toolchain || (is_linux && !is_chromeos) || is_mac + current_toolchain == host_toolchain || + (is_linux && !is_chromeos && current_cpu != "arm") || is_mac group("dart_sdk") { if (_build_engine_artifacts) { diff --git a/DEPS b/DEPS index a87bf7000588f..89fe8ff08a2e8 100644 --- a/DEPS +++ b/DEPS @@ -739,6 +739,15 @@ hooks = [ 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=arm64'], }, + { + 'name': 'linux_sysroot_arm', + 'pattern': '.', + 'condition': 'download_linux_deps', + 'action': [ + 'python3', + 'src/build/linux/sysroot_scripts/install-sysroot.py', + '--arch=arm'], + }, { 'name': 'pub get --offline', 'pattern': '.', diff --git a/tools/gn b/tools/gn index 1d82182c73c34..7fdff1ff1b47f 100755 --- a/tools/gn +++ b/tools/gn @@ -88,7 +88,7 @@ def is_host_build(args): # target_os='linux' and linux-cpu='arm64' # TODO(fujino): make host platform explicit # https://github.com/flutter/flutter/issues/79403 - return args.target_os is None or args.target_os == 'linux' + return args.target_os is None or (args.target_os == 'linux' and args.linux_cpu == 'arm64') # Determines whether a prebuilt Dart SDK can be used instead of building one. # We can use a prebuilt Dart SDK when: From 1f69319212fa7e538bd5c2e2f73ed8a2883e2412 Mon Sep 17 00:00:00 2001 From: Hannes Winkler Date: Fri, 5 Nov 2021 15:14:22 +0100 Subject: [PATCH 2/2] add todo link in BUILD.gn - don't download arm sysroot on checkout --- BUILD.gn | 2 ++ DEPS | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 133e091360e32..cca086c104479 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -46,6 +46,8 @@ if (flutter_prebuilt_dart_sdk) { # Flutter SDK artifacts should only be built when either doing host builds, or # for cross-compiled desktop targets. +# TODO: We can't build the engine artifacts for arm (32-bit) right now; +# see https://github.com/flutter/flutter/issues/74322 _build_engine_artifacts = current_toolchain == host_toolchain || (is_linux && !is_chromeos && current_cpu != "arm") || is_mac diff --git a/DEPS b/DEPS index 89fe8ff08a2e8..a87bf7000588f 100644 --- a/DEPS +++ b/DEPS @@ -739,15 +739,6 @@ hooks = [ 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=arm64'], }, - { - 'name': 'linux_sysroot_arm', - 'pattern': '.', - 'condition': 'download_linux_deps', - 'action': [ - 'python3', - 'src/build/linux/sysroot_scripts/install-sysroot.py', - '--arch=arm'], - }, { 'name': 'pub get --offline', 'pattern': '.',