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

Add support of cross-building the engine for ARM64 Linux Host #20254

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Simon Lightfoot <[email protected]>
Dwayne Slater <[email protected]>
Tetsuhiro Ueda <[email protected]>
shoryukenn <[email protected]>
SOTEC GmbH & Co. KG <[email protected]>
SOTEC GmbH & Co. KG <[email protected]>
Hidenori Matsubayashi <[email protected]>
10 changes: 7 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,19 @@ 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 += [
"//flutter/lib/snapshot:generate_snapshot_bin",
"//flutter/lib/snapshot:kernel_platform_files",
]

if (current_toolchain == host_toolchain) {
if (build_engine_artifacts) {
public_deps += [
"//flutter/flutter_frontend_server:frontend_server",
"//third_party/dart:create_sdk",
Expand All @@ -64,8 +69,7 @@ group("flutter") {
}
}

# If on the host, compile tools.
if (current_toolchain == host_toolchain) {
if (build_engine_artifacts) {
public_deps += [
"//flutter/shell/testing",
"//flutter/tools/const_finder",
Expand Down
11 changes: 10 additions & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,23 @@ hooks = [
],
},
{
'name': 'linux_sysroot',
'name': 'linux_sysroot_x64',
'pattern': '.',
'condition': 'download_linux_deps',
'action': [
'python',
'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': '.',
Expand Down