From 02eebb0c69148db782c34ad67169c086b70d2167 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Wed, 1 Nov 2017 21:13:28 +0000 Subject: [PATCH] [GN] Remove the dart_host_toolchain arg This flag can be removed after: https://github.com/flutter/engine/pull/4308 lands. Change-Id: I4730aaece1e43cf71ea569bda78c2cd546a66358 Reviewed-on: https://dart-review.googlesource.com/18060 Reviewed-by: Alexander Aprelev --- BUILD.gn | 8 +++----- build/compiled_action.gni | 18 ++++++++---------- build/dart_host_toolchain.gni | 13 ------------- runtime/observatory/BUILD.gn | 7 +++---- utils/compile_platform.gni | 5 ++--- utils/compiler/BUILD.gn | 2 +- utils/generate_patch_sdk.gni | 5 ++--- utils/kernel-service/BUILD.gn | 3 +-- 8 files changed, 20 insertions(+), 41 deletions(-) delete mode 100644 build/dart_host_toolchain.gni diff --git a/BUILD.gn b/BUILD.gn index 936577f36d3..5ca0ff24cb5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2,8 +2,6 @@ # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. -import("build/dart_host_toolchain.gni") - # This target will be built if no target is specified when invoking ninja. group("default") { if (is_fuchsia || is_fuchsia_host) { @@ -38,7 +36,7 @@ group("runtime") { } deps = [ "runtime/bin:dart", - "runtime/bin:dart_bootstrap($dart_host_toolchain)", + "runtime/bin:dart_bootstrap($host_toolchain)", "runtime/bin:process_test", "runtime/bin:run_vm_tests", "runtime/bin:sample_extension", @@ -53,7 +51,7 @@ group("runtime_kernel") { } deps = [ ":runtime", - "runtime/vm:kernel_platform_files($dart_host_toolchain)", + "runtime/vm:kernel_platform_files($host_toolchain)", # TODO(rmacnak): Link this into 'dart'. "utils/kernel-service:kernel-service", @@ -62,7 +60,7 @@ group("runtime_kernel") { group("runtime_precompiled") { deps = [ - "runtime/bin:dart_bootstrap($dart_host_toolchain)", + "runtime/bin:dart_bootstrap($host_toolchain)", "runtime/bin:dart_precompiled_runtime", "runtime/bin:process_test", ] diff --git a/build/compiled_action.gni b/build/compiled_action.gni index 228378dc8a9..3951275e5ec 100644 --- a/build/compiled_action.gni +++ b/build/compiled_action.gni @@ -66,8 +66,6 @@ # saves unnecessarily compiling your tool for the target platform. But if you # need a target build of your tool as well, just leave off the if statement. -import("dart_host_toolchain.gni") - if (host_os == "win") { _host_executable_suffix = ".exe" } else { @@ -99,7 +97,7 @@ template("compiled_action") { outputs = invoker.outputs # Constuct the host toolchain version of the tool. - host_tool = invoker.tool + "($dart_host_toolchain)" + host_tool = invoker.tool + "($host_toolchain)" # Get the path to the executable. Currently, this assumes that the tool # does not specify output_name so that the target name is the name to use. @@ -123,9 +121,9 @@ template("compiled_action") { # The script takes as arguments the binary to run, and then the arguments # to pass it. args = [ - "compiled_action", - rebase_path(host_executable, root_build_dir) - ] + invoker.args + "compiled_action", + rebase_path(host_executable, root_build_dir), + ] + invoker.args } } @@ -152,7 +150,7 @@ template("compiled_action_foreach") { outputs = invoker.outputs # Constuct the host toolchain version of the tool. - host_tool = invoker.tool + "($dart_host_toolchain)" + host_tool = invoker.tool + "($host_toolchain)" # Get the path to the executable. Currently, this assumes that the tool # does not specify output_name so that the target name is the name to use. @@ -176,8 +174,8 @@ template("compiled_action_foreach") { # The script takes as arguments the binary to run, and then the arguments # to pass it. args = [ - "compiled_action", - rebase_path(host_executable, root_build_dir) - ] + invoker.args + "compiled_action", + rebase_path(host_executable, root_build_dir), + ] + invoker.args } } diff --git a/build/dart_host_toolchain.gni b/build/dart_host_toolchain.gni deleted file mode 100644 index 4100d513b0a..00000000000 --- a/build/dart_host_toolchain.gni +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. - -declare_args() { - # This argument allows to override host_toolchain used to build dart artifacts. - # This is needed to make sure that word size of the code produced on host - # machine matches word size of target architecture. For example, when - # targeting android arm 32-bit while building on linux 64-bit machine, dart vm - # that is used to produce snapshots for that android arm 32, has to be built - # using linux 32-bit toolchain. - dart_host_toolchain = host_toolchain -} diff --git a/runtime/observatory/BUILD.gn b/runtime/observatory/BUILD.gn index 71fa8f7615b..33573d56afd 100644 --- a/runtime/observatory/BUILD.gn +++ b/runtime/observatory/BUILD.gn @@ -4,17 +4,16 @@ import("../../build/executable_suffix.gni") import("../../build/prebuilt_dart_sdk.gni") -import("../../build/dart_host_toolchain.gni") import("observatory_sources.gni") # Construct arguments to the observatory tool for finding pub. pub_build_deps = [] pub_build_args = [] if (!prebuilt_dart_exe_works) { - pub_build_deps += [ "../bin:dart_bootstrap($dart_host_toolchain)" ] + pub_build_deps += [ "../bin:dart_bootstrap($host_toolchain)" ] - dart_out_dir = get_label_info("../bin:dart_bootstrap($dart_host_toolchain)", - "root_out_dir") + dart_out_dir = + get_label_info("../bin:dart_bootstrap($host_toolchain)", "root_out_dir") dart_bootstrap = rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix") pub_build_args = [ diff --git a/utils/compile_platform.gni b/utils/compile_platform.gni index 3fcec324ea2..e539da55c6b 100644 --- a/utils/compile_platform.gni +++ b/utils/compile_platform.gni @@ -2,7 +2,6 @@ # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. -import("../build/dart_host_toolchain.gni") import("../build/prebuilt_dart_sdk.gni") _dart_root = get_path_info("..", "abspath") @@ -36,9 +35,9 @@ template("compile_platform") { depfile = outputs[0] + ".d" if (!prebuilt_dart_exe_works) { - deps += [ "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)" ] + deps += [ "$_dart_root/runtime/bin:dart_bootstrap($host_toolchain)" ] dart_out_dir = get_label_info( - "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)", + "$_dart_root/runtime/bin:dart_bootstrap($host_toolchain)", "root_out_dir") args += [ "--dart-executable", diff --git a/utils/compiler/BUILD.gn b/utils/compiler/BUILD.gn index 7f2f927d982..00f992150f3 100644 --- a/utils/compiler/BUILD.gn +++ b/utils/compiler/BUILD.gn @@ -84,7 +84,7 @@ generate_patched_sdk("patched_dart2js_sdk") { deps = [ # TODO(ahe): This is needed by ../../tools/patch_sdk.dart to compute # dependencies. - "../../runtime/vm:kernel_platform_files($dart_host_toolchain)", + "../../runtime/vm:kernel_platform_files($host_toolchain)", ] input_patches_dir = "../../sdk/lib/_internal/js_runtime/lib" patched_sdk_dir = "patched_dart2js_sdk" diff --git a/utils/generate_patch_sdk.gni b/utils/generate_patch_sdk.gni index 1cca8496f05..f704b2407cd 100644 --- a/utils/generate_patch_sdk.gni +++ b/utils/generate_patch_sdk.gni @@ -3,7 +3,6 @@ # BSD-style license that can be found in the LICENSE file. import("../build/prebuilt_dart_sdk.gni") -import("../build/dart_host_toolchain.gni") _dart_root = get_path_info("..", "abspath") @@ -29,7 +28,7 @@ template("generate_patched_sdk") { } if (!prebuilt_dart_exe_works) { - deps += [ "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)" ] + deps += [ "$_dart_root/runtime/bin:dart_bootstrap($host_toolchain)" ] } script = "$_dart_root/tools/patch_sdk.py" @@ -56,7 +55,7 @@ template("generate_patched_sdk") { args = [ "--quiet" ] if (!prebuilt_dart_exe_works) { dart_out_dir = get_label_info( - "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)", + "$_dart_root/runtime/bin:dart_bootstrap($host_toolchain)", "root_out_dir") dart_bootstrap = rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix") diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn index 3e3e1e624a9..e84716914fb 100644 --- a/utils/kernel-service/BUILD.gn +++ b/utils/kernel-service/BUILD.gn @@ -3,12 +3,11 @@ # BSD-style license that can be found in the LICENSE file. import("../application_snapshot.gni") -import("../../build/dart_host_toolchain.gni") application_snapshot("kernel-service") { dfe_script = "kernel-service.dart" deps = [ - "../../runtime/vm:kernel_platform_files($dart_host_toolchain)", + "../../runtime/vm:kernel_platform_files($host_toolchain)", ] main_dart = dfe_script training_args = [