mirror of
https://github.com/dart-lang/sdk
synced 2024-10-02 23:39:19 +00:00
[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 <aam@google.com>
This commit is contained in:
parent
6661da9b86
commit
02eebb0c69
8
BUILD.gn
8
BUILD.gn
|
@ -2,8 +2,6 @@
|
||||||
# for details. All rights reserved. Use of this source code is governed by a
|
# 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.
|
# 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.
|
# This target will be built if no target is specified when invoking ninja.
|
||||||
group("default") {
|
group("default") {
|
||||||
if (is_fuchsia || is_fuchsia_host) {
|
if (is_fuchsia || is_fuchsia_host) {
|
||||||
|
@ -38,7 +36,7 @@ group("runtime") {
|
||||||
}
|
}
|
||||||
deps = [
|
deps = [
|
||||||
"runtime/bin:dart",
|
"runtime/bin:dart",
|
||||||
"runtime/bin:dart_bootstrap($dart_host_toolchain)",
|
"runtime/bin:dart_bootstrap($host_toolchain)",
|
||||||
"runtime/bin:process_test",
|
"runtime/bin:process_test",
|
||||||
"runtime/bin:run_vm_tests",
|
"runtime/bin:run_vm_tests",
|
||||||
"runtime/bin:sample_extension",
|
"runtime/bin:sample_extension",
|
||||||
|
@ -53,7 +51,7 @@ group("runtime_kernel") {
|
||||||
}
|
}
|
||||||
deps = [
|
deps = [
|
||||||
":runtime",
|
":runtime",
|
||||||
"runtime/vm:kernel_platform_files($dart_host_toolchain)",
|
"runtime/vm:kernel_platform_files($host_toolchain)",
|
||||||
|
|
||||||
# TODO(rmacnak): Link this into 'dart'.
|
# TODO(rmacnak): Link this into 'dart'.
|
||||||
"utils/kernel-service:kernel-service",
|
"utils/kernel-service:kernel-service",
|
||||||
|
@ -62,7 +60,7 @@ group("runtime_kernel") {
|
||||||
|
|
||||||
group("runtime_precompiled") {
|
group("runtime_precompiled") {
|
||||||
deps = [
|
deps = [
|
||||||
"runtime/bin:dart_bootstrap($dart_host_toolchain)",
|
"runtime/bin:dart_bootstrap($host_toolchain)",
|
||||||
"runtime/bin:dart_precompiled_runtime",
|
"runtime/bin:dart_precompiled_runtime",
|
||||||
"runtime/bin:process_test",
|
"runtime/bin:process_test",
|
||||||
]
|
]
|
||||||
|
|
|
@ -66,8 +66,6 @@
|
||||||
# saves unnecessarily compiling your tool for the target platform. But if you
|
# 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.
|
# need a target build of your tool as well, just leave off the if statement.
|
||||||
|
|
||||||
import("dart_host_toolchain.gni")
|
|
||||||
|
|
||||||
if (host_os == "win") {
|
if (host_os == "win") {
|
||||||
_host_executable_suffix = ".exe"
|
_host_executable_suffix = ".exe"
|
||||||
} else {
|
} else {
|
||||||
|
@ -99,7 +97,7 @@ template("compiled_action") {
|
||||||
outputs = invoker.outputs
|
outputs = invoker.outputs
|
||||||
|
|
||||||
# Constuct the host toolchain version of the tool.
|
# 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
|
# 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.
|
# 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
|
# The script takes as arguments the binary to run, and then the arguments
|
||||||
# to pass it.
|
# to pass it.
|
||||||
args = [
|
args = [
|
||||||
"compiled_action",
|
"compiled_action",
|
||||||
rebase_path(host_executable, root_build_dir)
|
rebase_path(host_executable, root_build_dir),
|
||||||
] + invoker.args
|
] + invoker.args
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +150,7 @@ template("compiled_action_foreach") {
|
||||||
outputs = invoker.outputs
|
outputs = invoker.outputs
|
||||||
|
|
||||||
# Constuct the host toolchain version of the tool.
|
# 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
|
# 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.
|
# 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
|
# The script takes as arguments the binary to run, and then the arguments
|
||||||
# to pass it.
|
# to pass it.
|
||||||
args = [
|
args = [
|
||||||
"compiled_action",
|
"compiled_action",
|
||||||
rebase_path(host_executable, root_build_dir)
|
rebase_path(host_executable, root_build_dir),
|
||||||
] + invoker.args
|
] + invoker.args
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -4,17 +4,16 @@
|
||||||
|
|
||||||
import("../../build/executable_suffix.gni")
|
import("../../build/executable_suffix.gni")
|
||||||
import("../../build/prebuilt_dart_sdk.gni")
|
import("../../build/prebuilt_dart_sdk.gni")
|
||||||
import("../../build/dart_host_toolchain.gni")
|
|
||||||
import("observatory_sources.gni")
|
import("observatory_sources.gni")
|
||||||
|
|
||||||
# Construct arguments to the observatory tool for finding pub.
|
# Construct arguments to the observatory tool for finding pub.
|
||||||
pub_build_deps = []
|
pub_build_deps = []
|
||||||
pub_build_args = []
|
pub_build_args = []
|
||||||
if (!prebuilt_dart_exe_works) {
|
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)",
|
dart_out_dir =
|
||||||
"root_out_dir")
|
get_label_info("../bin:dart_bootstrap($host_toolchain)", "root_out_dir")
|
||||||
dart_bootstrap = rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
|
dart_bootstrap = rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
|
||||||
|
|
||||||
pub_build_args = [
|
pub_build_args = [
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# for details. All rights reserved. Use of this source code is governed by a
|
# 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.
|
# BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import("../build/dart_host_toolchain.gni")
|
|
||||||
import("../build/prebuilt_dart_sdk.gni")
|
import("../build/prebuilt_dart_sdk.gni")
|
||||||
|
|
||||||
_dart_root = get_path_info("..", "abspath")
|
_dart_root = get_path_info("..", "abspath")
|
||||||
|
@ -36,9 +35,9 @@ template("compile_platform") {
|
||||||
depfile = outputs[0] + ".d"
|
depfile = outputs[0] + ".d"
|
||||||
|
|
||||||
if (!prebuilt_dart_exe_works) {
|
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_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")
|
"root_out_dir")
|
||||||
args += [
|
args += [
|
||||||
"--dart-executable",
|
"--dart-executable",
|
||||||
|
|
|
@ -84,7 +84,7 @@ generate_patched_sdk("patched_dart2js_sdk") {
|
||||||
deps = [
|
deps = [
|
||||||
# TODO(ahe): This is needed by ../../tools/patch_sdk.dart to compute
|
# TODO(ahe): This is needed by ../../tools/patch_sdk.dart to compute
|
||||||
# dependencies.
|
# 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"
|
input_patches_dir = "../../sdk/lib/_internal/js_runtime/lib"
|
||||||
patched_sdk_dir = "patched_dart2js_sdk"
|
patched_sdk_dir = "patched_dart2js_sdk"
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
# BSD-style license that can be found in the LICENSE file.
|
# BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import("../build/prebuilt_dart_sdk.gni")
|
import("../build/prebuilt_dart_sdk.gni")
|
||||||
import("../build/dart_host_toolchain.gni")
|
|
||||||
|
|
||||||
_dart_root = get_path_info("..", "abspath")
|
_dart_root = get_path_info("..", "abspath")
|
||||||
|
|
||||||
|
@ -29,7 +28,7 @@ template("generate_patched_sdk") {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!prebuilt_dart_exe_works) {
|
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"
|
script = "$_dart_root/tools/patch_sdk.py"
|
||||||
|
@ -56,7 +55,7 @@ template("generate_patched_sdk") {
|
||||||
args = [ "--quiet" ]
|
args = [ "--quiet" ]
|
||||||
if (!prebuilt_dart_exe_works) {
|
if (!prebuilt_dart_exe_works) {
|
||||||
dart_out_dir = get_label_info(
|
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")
|
"root_out_dir")
|
||||||
dart_bootstrap =
|
dart_bootstrap =
|
||||||
rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
|
rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
# BSD-style license that can be found in the LICENSE file.
|
# BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
import("../application_snapshot.gni")
|
import("../application_snapshot.gni")
|
||||||
import("../../build/dart_host_toolchain.gni")
|
|
||||||
|
|
||||||
application_snapshot("kernel-service") {
|
application_snapshot("kernel-service") {
|
||||||
dfe_script = "kernel-service.dart"
|
dfe_script = "kernel-service.dart"
|
||||||
deps = [
|
deps = [
|
||||||
"../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
|
"../../runtime/vm:kernel_platform_files($host_toolchain)",
|
||||||
]
|
]
|
||||||
main_dart = dfe_script
|
main_dart = dfe_script
|
||||||
training_args = [
|
training_args = [
|
||||||
|
|
Loading…
Reference in a new issue