diff --git a/BUILD.gn b/BUILD.gn index e621934e475..3f93c69511f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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 } diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 4dfbaf694ef..ff7b42f7665 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -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. diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index 6afa317adbb..83e59cb4422 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -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 } diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 41adf0158ee..5f352ab64e7 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -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,