1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-03 00:08:46 +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:
James Robinson 2018-01-18 06:05:56 +00:00 committed by commit-bot@chromium.org
parent 8a7c3331df
commit 138d587e3a
4 changed files with 10 additions and 14 deletions

View File

@ -4,9 +4,11 @@
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.
group("default") {
if (is_fuchsia || is_fuchsia_host) {
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
@ -16,7 +18,7 @@ group("default") {
}
group("most") {
if (is_fuchsia || is_fuchsia_host) {
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
@ -32,7 +34,7 @@ group("most") {
}
group("runtime") {
if (is_fuchsia || is_fuchsia_host) {
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}
@ -47,7 +49,7 @@ group("runtime") {
}
group("runtime_kernel") {
if (is_fuchsia || is_fuchsia_host) {
if (targetting_fuchsia) {
# Fuchsia has run_vm_tests marked testonly.
testonly = true
}

View File

@ -154,7 +154,6 @@ if (current_os == "win") {
is_android = false
is_chromeos = false
is_fuchsia = false
is_fuchsia_host = false
is_ios = false
is_linux = false
is_mac = false
@ -165,7 +164,6 @@ if (current_os == "win") {
is_android = false
is_chromeos = false
is_fuchsia = false
is_fuchsia_host = false
is_ios = false
is_linux = false
is_mac = true
@ -176,7 +174,6 @@ if (current_os == "win") {
is_android = true
is_chromeos = false
is_fuchsia = false
is_fuchsia_host = false
is_ios = false
is_linux = false
is_mac = false
@ -187,7 +184,6 @@ if (current_os == "win") {
is_android = false
is_chromeos = false
is_fuchsia = false
is_fuchsia_host = false
is_ios = false
is_linux = true
is_mac = false
@ -252,9 +248,7 @@ if (is_linux) {
}
if (is_clang) {
_native_compiler_configs += [
"//build/config/clang:extra_warnings",
]
_native_compiler_configs += [ "//build/config/clang:extra_warnings" ]
}
# Optimizations and debug checking.

View File

@ -712,7 +712,7 @@ template("dart_executable") {
if (is_fuchsia) {
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
# have them. They are needed for running Fuchsia binaries built for the
# host.
@ -1005,7 +1005,7 @@ action("generate_snapshot_test_dat_file") {
}
executable("run_vm_tests") {
if (is_fuchsia || is_fuchsia_host) {
if (target_os == "fuchsia") {
testonly = true
}

View File

@ -314,7 +314,7 @@ copy_trees("copy_trees") {
}
# 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.
# First, it makes the lookup of shared libraries relative to $ORIGIN
# (Linux) or @loader_path (macOS) find the libraries where they are,