Add Linux ARM and Linux RISCV64 cross compilation gen_snapshot binaries.
TEST=ci Issue: https://github.com/dart-lang/sdk/issues/28617 Change-Id: Ia458f167c0e75fe9c7e31684bfaf9967499e9cda Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437720 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
This commit is contained in:
committed by
Commit Queue
parent
c0146bc2f8
commit
d257c52309
@@ -149,6 +149,26 @@ config("dart_linux_x64_config") {
|
||||
]
|
||||
}
|
||||
|
||||
# We need to build gen_snapshot targeting Linux ARM during a build
|
||||
# of the SDK. This configuration is used to unconditionally target
|
||||
# Linux ARM. It should not be combined with dart_os_config and dart_arch_config.
|
||||
config("dart_linux_arm_config") {
|
||||
defines = [
|
||||
"DART_TARGET_OS_LINUX",
|
||||
"TARGET_ARCH_ARM",
|
||||
]
|
||||
}
|
||||
|
||||
# We need to build gen_snapshot targeting Linux RISCV64 during a build
|
||||
# of the SDK. This configuration is used to unconditionally target
|
||||
# Linux RISCV64. It should not be combined with dart_os_config and dart_arch_config.
|
||||
config("dart_linux_riscv64_config") {
|
||||
defines = [
|
||||
"DART_TARGET_OS_LINUX",
|
||||
"TARGET_ARCH_RISCV64",
|
||||
]
|
||||
}
|
||||
|
||||
config("dart_arch_config") {
|
||||
defines = []
|
||||
|
||||
|
||||
@@ -109,6 +109,20 @@ build_libdart_builtin("libdart_builtin_product_linux_arm64") {
|
||||
]
|
||||
}
|
||||
|
||||
build_libdart_builtin("libdart_builtin_product_linux_arm") {
|
||||
extra_configs = [
|
||||
"..:dart_product_config",
|
||||
"..:dart_linux_arm_config",
|
||||
]
|
||||
}
|
||||
|
||||
build_libdart_builtin("libdart_builtin_product_linux_riscv64") {
|
||||
extra_configs = [
|
||||
"..:dart_product_config",
|
||||
"..:dart_linux_riscv64_config",
|
||||
]
|
||||
}
|
||||
|
||||
template("build_native_assets_api") {
|
||||
extra_configs = []
|
||||
if (defined(invoker.extra_configs)) {
|
||||
@@ -366,6 +380,33 @@ build_gen_snapshot("gen_snapshot_product_linux_arm64") {
|
||||
"../platform:libdart_platform_precompiler_product_linux_arm64",
|
||||
]
|
||||
}
|
||||
|
||||
build_gen_snapshot("gen_snapshot_product_linux_arm") {
|
||||
extra_configs = [
|
||||
"..:dart_product_config",
|
||||
"..:dart_linux_arm_config",
|
||||
]
|
||||
extra_deps = [
|
||||
":gen_snapshot_dart_io_product_linux_arm",
|
||||
":libdart_builtin_product_linux_arm",
|
||||
"..:libdart_precompiler_product_linux_arm",
|
||||
"../platform:libdart_platform_precompiler_product_linux_arm",
|
||||
]
|
||||
}
|
||||
|
||||
build_gen_snapshot("gen_snapshot_product_linux_riscv64") {
|
||||
extra_configs = [
|
||||
"..:dart_product_config",
|
||||
"..:dart_linux_riscv64_config",
|
||||
]
|
||||
extra_deps = [
|
||||
":gen_snapshot_dart_io_product_linux_riscv64",
|
||||
":libdart_builtin_product_linux_riscv64",
|
||||
"..:libdart_precompiler_product_linux_riscv64",
|
||||
"../platform:libdart_platform_precompiler_product_linux_riscv64",
|
||||
]
|
||||
}
|
||||
|
||||
build_gen_snapshot("gen_snapshot_host_targeting_host") {
|
||||
extra_configs = [ "..:dart_maybe_product_config" ]
|
||||
extra_deps = [
|
||||
@@ -468,6 +509,20 @@ build_gen_snapshot_dart_io("gen_snapshot_dart_io_product_linux_arm64") {
|
||||
]
|
||||
}
|
||||
|
||||
build_gen_snapshot_dart_io("gen_snapshot_dart_io_product_linux_arm") {
|
||||
extra_configs = [
|
||||
"..:dart_product_config",
|
||||
"..:dart_linux_arm_config",
|
||||
]
|
||||
}
|
||||
|
||||
build_gen_snapshot_dart_io("gen_snapshot_dart_io_product_linux_riscv64") {
|
||||
extra_configs = [
|
||||
"..:dart_product_config",
|
||||
"..:dart_linux_riscv64_config",
|
||||
]
|
||||
}
|
||||
|
||||
# A source set for the implementation of 'dart:io' library.
|
||||
template("dart_io") {
|
||||
extra_configs = []
|
||||
|
||||
@@ -63,6 +63,18 @@ _precompiler_product_linux_arm64_config =
|
||||
"$_dart_runtime:dart_linux_arm64_config",
|
||||
] + _product + _precompiler_base
|
||||
|
||||
_precompiler_product_linux_arm_config =
|
||||
[
|
||||
"$_dart_runtime:dart_config",
|
||||
"$_dart_runtime:dart_linux_arm_config",
|
||||
] + _product + _precompiler_base
|
||||
|
||||
_precompiler_product_linux_riscv64_config =
|
||||
[
|
||||
"$_dart_runtime:dart_config",
|
||||
"$_dart_runtime:dart_linux_riscv64_config",
|
||||
] + _product + _precompiler_base
|
||||
|
||||
_all_configs = [
|
||||
{
|
||||
suffix = "_jit"
|
||||
@@ -148,6 +160,20 @@ _all_configs = [
|
||||
compiler = true
|
||||
is_product = true
|
||||
},
|
||||
{
|
||||
suffix = "_precompiler_product_linux_arm"
|
||||
configs = _precompiler_product_linux_arm_config
|
||||
snapshot = false
|
||||
compiler = true
|
||||
is_product = true
|
||||
},
|
||||
{
|
||||
suffix = "_precompiler_product_linux_riscv64"
|
||||
configs = _precompiler_product_linux_riscv64_config
|
||||
snapshot = false
|
||||
compiler = true
|
||||
is_product = true
|
||||
},
|
||||
]
|
||||
|
||||
# This template creates a target for each of the configurations listed above.
|
||||
|
||||
@@ -879,7 +879,9 @@ group("create_full_sdk") {
|
||||
# Do not include gen_snapshot binaries for cross-compilation into
|
||||
# SDK, but add them as a dependency, so that they are built.
|
||||
public_deps += [
|
||||
"../runtime/bin:gen_snapshot_product_linux_arm",
|
||||
"../runtime/bin:gen_snapshot_product_linux_arm64",
|
||||
"../runtime/bin:gen_snapshot_product_linux_riscv64",
|
||||
"../runtime/bin:gen_snapshot_product_linux_x64",
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user