From 4425890afc3900885a79bd703288cdf58d9c8a82 Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Mon, 3 Aug 2020 11:09:36 +0900 Subject: [PATCH 1/4] add download linux aarch64 sysroot --- AUTHORS | 3 ++- DEPS | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index d3f373b890f91..984e9f525e7c1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,4 +15,5 @@ Simon Lightfoot Dwayne Slater Tetsuhiro Ueda shoryukenn -SOTEC GmbH & Co. KG \ No newline at end of file +SOTEC GmbH & Co. KG +Hidenori Matsubayashi \ No newline at end of file diff --git a/DEPS b/DEPS index 12bc228cbe463..0bd71b12bdd74 100644 --- a/DEPS +++ b/DEPS @@ -621,7 +621,7 @@ hooks = [ ], }, { - 'name': 'linux_sysroot', + 'name': 'linux_sysroot_x64', 'pattern': '.', 'condition': 'download_linux_deps', 'action': [ @@ -629,6 +629,15 @@ hooks = [ 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=x64'], }, + { + 'name': 'linux_sysroot_arm64', + 'pattern': '.', + 'condition': 'download_linux_deps', + 'action': [ + 'python', + 'src/build/linux/sysroot_scripts/install-sysroot.py', + '--arch=arm64'], + }, { 'name': 'dart package config', 'pattern': '.', From 9158ef84c326dc7260bfe39dd65189dd033d0b29 Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Mon, 3 Aug 2020 18:42:43 +0900 Subject: [PATCH 2/4] support cross-build for linux aarch64 --- BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 90ca39d027844..4ea86b000a161 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -58,7 +58,7 @@ group("flutter") { "//flutter/lib/snapshot:kernel_platform_files", ] - if (current_toolchain == host_toolchain) { + if (current_toolchain == host_toolchain || is_linux) { public_deps += [ "//flutter/flutter_frontend_server:frontend_server", "//third_party/dart:create_sdk", @@ -71,7 +71,7 @@ group("flutter") { } # If on the host, compile tools. - if (current_toolchain == host_toolchain) { + if (current_toolchain == host_toolchain || is_linux) { public_deps += [ "//flutter/shell/testing", "//flutter/tools/const_finder", From 5a7736794b550e310d07247b16d1d10f41454ec2 Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Fri, 4 Sep 2020 09:03:14 +0900 Subject: [PATCH 3/4] Fix comment and condition --- BUILD.gn | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index cb6b0aec5d5b8..182b9c1c1d561 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -45,6 +45,10 @@ group("flutter") { "//flutter/sky", ] + # 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) + # If enbaled, compile the SDK / snapshot. if (!is_fuchsia) { public_deps += [ @@ -52,7 +56,7 @@ group("flutter") { "//flutter/lib/snapshot:kernel_platform_files", ] - if (current_toolchain == host_toolchain || is_linux) { + if (build_engine_artifacts) { public_deps += [ "//flutter/flutter_frontend_server:frontend_server", "//third_party/dart:create_sdk", @@ -64,8 +68,7 @@ group("flutter") { } } - # If on the host, compile tools. - if (current_toolchain == host_toolchain || is_linux) { + if (build_engine_artifacts) { public_deps += [ "//flutter/shell/testing", "//flutter/tools/const_finder", From 6d01cec384b28864702d635acbad56b38ff374e2 Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Wed, 9 Sep 2020 08:57:22 +0900 Subject: [PATCH 4/4] Fix GN formatting error --- BUILD.gn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 182b9c1c1d561..def7ccfe808d1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -47,7 +47,8 @@ group("flutter") { # 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) + build_engine_artifacts = + current_toolchain == host_toolchain || (is_linux && !is_chromeos) # If enbaled, compile the SDK / snapshot. if (!is_fuchsia) {