mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:35:05 +00:00
[gn] Remove uses of is_fuchsia_host GN variable
Some parts of the Dart build need to be customized when running the host steps for a build ultimately targeting a Fuchsia build. This was set by passing a special GN variable indicating that a configuration was a host configuration targeting a Fuchsia build, but the built-in GN variable 'target_os' has the same result as it is the same across all toolchains in a particular build. This replaces the test: is_fuchsia || is_fuchsia_host with the equivalent: target_os == "fuchsia" and the less common: is_fuchsia_host with: target_os != current_os && target_os == "fuchsia" Change-Id: Iabec1fb2879b234ca44c9e03b2f4a62ffbc6fa4a Reviewed-on: https://dart-review.googlesource.com/35542 Reviewed-by: Zach Anderson <zra@google.com> Commit-Queue: Zach Anderson <zra@google.com>
This commit is contained in:
parent
8a7c3331df
commit
138d587e3a
10
BUILD.gn
10
BUILD.gn
|
@ -4,9 +4,11 @@
|
||||||
|
|
||||||
import("build/dart_host_sdk_toolchain.gni")
|
import("build/dart_host_sdk_toolchain.gni")
|
||||||
|
|
||||||
|
targetting_fuchsia = target_os == "fuchsia"
|
||||||
|
|
||||||
# This target will be built if no target is specified when invoking ninja.
|
# This target will be built if no target is specified when invoking ninja.
|
||||||
group("default") {
|
group("default") {
|
||||||
if (is_fuchsia || is_fuchsia_host) {
|
if (targetting_fuchsia) {
|
||||||
# Fuchsia has run_vm_tests marked testonly.
|
# Fuchsia has run_vm_tests marked testonly.
|
||||||
testonly = true
|
testonly = true
|
||||||
}
|
}
|
||||||
|
@ -16,7 +18,7 @@ group("default") {
|
||||||
}
|
}
|
||||||
|
|
||||||
group("most") {
|
group("most") {
|
||||||
if (is_fuchsia || is_fuchsia_host) {
|
if (targetting_fuchsia) {
|
||||||
# Fuchsia has run_vm_tests marked testonly.
|
# Fuchsia has run_vm_tests marked testonly.
|
||||||
testonly = true
|
testonly = true
|
||||||
}
|
}
|
||||||
|
@ -32,7 +34,7 @@ group("most") {
|
||||||
}
|
}
|
||||||
|
|
||||||
group("runtime") {
|
group("runtime") {
|
||||||
if (is_fuchsia || is_fuchsia_host) {
|
if (targetting_fuchsia) {
|
||||||
# Fuchsia has run_vm_tests marked testonly.
|
# Fuchsia has run_vm_tests marked testonly.
|
||||||
testonly = true
|
testonly = true
|
||||||
}
|
}
|
||||||
|
@ -47,7 +49,7 @@ group("runtime") {
|
||||||
}
|
}
|
||||||
|
|
||||||
group("runtime_kernel") {
|
group("runtime_kernel") {
|
||||||
if (is_fuchsia || is_fuchsia_host) {
|
if (targetting_fuchsia) {
|
||||||
# Fuchsia has run_vm_tests marked testonly.
|
# Fuchsia has run_vm_tests marked testonly.
|
||||||
testonly = true
|
testonly = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,6 @@ if (current_os == "win") {
|
||||||
is_android = false
|
is_android = false
|
||||||
is_chromeos = false
|
is_chromeos = false
|
||||||
is_fuchsia = false
|
is_fuchsia = false
|
||||||
is_fuchsia_host = false
|
|
||||||
is_ios = false
|
is_ios = false
|
||||||
is_linux = false
|
is_linux = false
|
||||||
is_mac = false
|
is_mac = false
|
||||||
|
@ -165,7 +164,6 @@ if (current_os == "win") {
|
||||||
is_android = false
|
is_android = false
|
||||||
is_chromeos = false
|
is_chromeos = false
|
||||||
is_fuchsia = false
|
is_fuchsia = false
|
||||||
is_fuchsia_host = false
|
|
||||||
is_ios = false
|
is_ios = false
|
||||||
is_linux = false
|
is_linux = false
|
||||||
is_mac = true
|
is_mac = true
|
||||||
|
@ -176,7 +174,6 @@ if (current_os == "win") {
|
||||||
is_android = true
|
is_android = true
|
||||||
is_chromeos = false
|
is_chromeos = false
|
||||||
is_fuchsia = false
|
is_fuchsia = false
|
||||||
is_fuchsia_host = false
|
|
||||||
is_ios = false
|
is_ios = false
|
||||||
is_linux = false
|
is_linux = false
|
||||||
is_mac = false
|
is_mac = false
|
||||||
|
@ -187,7 +184,6 @@ if (current_os == "win") {
|
||||||
is_android = false
|
is_android = false
|
||||||
is_chromeos = false
|
is_chromeos = false
|
||||||
is_fuchsia = false
|
is_fuchsia = false
|
||||||
is_fuchsia_host = false
|
|
||||||
is_ios = false
|
is_ios = false
|
||||||
is_linux = true
|
is_linux = true
|
||||||
is_mac = false
|
is_mac = false
|
||||||
|
@ -252,9 +248,7 @@ if (is_linux) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
_native_compiler_configs += [
|
_native_compiler_configs += [ "//build/config/clang:extra_warnings" ]
|
||||||
"//build/config/clang:extra_warnings",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Optimizations and debug checking.
|
# Optimizations and debug checking.
|
||||||
|
|
|
@ -712,7 +712,7 @@ template("dart_executable") {
|
||||||
if (is_fuchsia) {
|
if (is_fuchsia) {
|
||||||
configs -= [ "//build/config:symbol_visibility_hidden" ]
|
configs -= [ "//build/config:symbol_visibility_hidden" ]
|
||||||
}
|
}
|
||||||
if (is_fuchsia_host) {
|
if (target_os != current_os && target_os == "fuchsia") {
|
||||||
# We already have these in the standalone build, but Fuchsia doesn't
|
# We already have these in the standalone build, but Fuchsia doesn't
|
||||||
# have them. They are needed for running Fuchsia binaries built for the
|
# have them. They are needed for running Fuchsia binaries built for the
|
||||||
# host.
|
# host.
|
||||||
|
@ -1005,7 +1005,7 @@ action("generate_snapshot_test_dat_file") {
|
||||||
}
|
}
|
||||||
|
|
||||||
executable("run_vm_tests") {
|
executable("run_vm_tests") {
|
||||||
if (is_fuchsia || is_fuchsia_host) {
|
if (target_os == "fuchsia") {
|
||||||
testonly = true
|
testonly = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ copy_trees("copy_trees") {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Copies the Dart VM binary into bin/
|
# Copies the Dart VM binary into bin/
|
||||||
if (is_fuchsia_host) {
|
if (target_os != current_os && target_os == "fuchsia") {
|
||||||
# In the Fuchsia build, this has to use a symlink for two reasons.
|
# In the Fuchsia build, this has to use a symlink for two reasons.
|
||||||
# First, it makes the lookup of shared libraries relative to $ORIGIN
|
# First, it makes the lookup of shared libraries relative to $ORIGIN
|
||||||
# (Linux) or @loader_path (macOS) find the libraries where they are,
|
# (Linux) or @loader_path (macOS) find the libraries where they are,
|
||||||
|
|
Loading…
Reference in a new issue