Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 101d85a

Browse files
Add support of cross-building the engine for ARM64 Linux Host (#20254)
Added cross-building Flutter Engine for ARM64 Linux platforms. This PR is part of ARM64 Linux support in the Flutter SDK.
1 parent f16657f commit 101d85a

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

AUTHORS

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ Simon Lightfoot <[email protected]>
1515
Dwayne Slater <[email protected]>
1616
Tetsuhiro Ueda <[email protected]>
1717
shoryukenn <[email protected]>
18-
SOTEC GmbH & Co. KG <[email protected]>
18+
SOTEC GmbH & Co. KG <[email protected]>
19+
Hidenori Matsubayashi <[email protected]>

BUILD.gn

+7-3
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,19 @@ group("flutter") {
4545
"//flutter/sky",
4646
]
4747

48+
# Flutter SDK artifacts should only be built when either doing host builds, or
49+
# for cross-compiled desktop targets.
50+
build_engine_artifacts =
51+
current_toolchain == host_toolchain || (is_linux && !is_chromeos)
52+
4853
# If enbaled, compile the SDK / snapshot.
4954
if (!is_fuchsia) {
5055
public_deps += [
5156
"//flutter/lib/snapshot:generate_snapshot_bin",
5257
"//flutter/lib/snapshot:kernel_platform_files",
5358
]
5459

55-
if (current_toolchain == host_toolchain) {
60+
if (build_engine_artifacts) {
5661
public_deps += [
5762
"//flutter/flutter_frontend_server:frontend_server",
5863
"//third_party/dart:create_sdk",
@@ -64,8 +69,7 @@ group("flutter") {
6469
}
6570
}
6671

67-
# If on the host, compile tools.
68-
if (current_toolchain == host_toolchain) {
72+
if (build_engine_artifacts) {
6973
public_deps += [
7074
"//flutter/shell/testing",
7175
"//flutter/tools/const_finder",

DEPS

+10-1
Original file line numberDiff line numberDiff line change
@@ -616,14 +616,23 @@ hooks = [
616616
],
617617
},
618618
{
619-
'name': 'linux_sysroot',
619+
'name': 'linux_sysroot_x64',
620620
'pattern': '.',
621621
'condition': 'download_linux_deps',
622622
'action': [
623623
'python',
624624
'src/build/linux/sysroot_scripts/install-sysroot.py',
625625
'--arch=x64'],
626626
},
627+
{
628+
'name': 'linux_sysroot_arm64',
629+
'pattern': '.',
630+
'condition': 'download_linux_deps',
631+
'action': [
632+
'python',
633+
'src/build/linux/sysroot_scripts/install-sysroot.py',
634+
'--arch=arm64'],
635+
},
627636
{
628637
'name': 'dart package config',
629638
'pattern': '.',

0 commit comments

Comments
 (0)