mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:29:48 +00:00
Revert "[GN] Adds dart_host_sdk_toolchain argument"
This reverts commit 8fc90bd3bc
.
Broken precomp bots due to wrong toolchain condition in dart_arch_config and dart_os_config.
Change-Id: Ic5c75f9ca3a0d4f316678354da44d1fcca10499d
Reviewed-on: https://dart-review.googlesource.com/18360
Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
parent
8fc90bd3bc
commit
8f5d55623e
10
BUILD.gn
10
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_sdk_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) {
|
||||||
|
@ -74,14 +72,6 @@ group("create_sdk") {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dart_host_sdk_toolchain != host_toolchain) {
|
|
||||||
group("create_host_sdk") {
|
|
||||||
deps = [
|
|
||||||
"sdk:create_sdk($dart_host_sdk_toolchain)",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
group("dart2js") {
|
group("dart2js") {
|
||||||
deps = [
|
deps = [
|
||||||
"utils/compiler:dart2js",
|
"utils/compiler:dart2js",
|
||||||
|
|
|
@ -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_sdk_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.
|
||||||
|
@ -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.
|
||||||
|
|
|
@ -1,18 +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() {
|
|
||||||
# In a cross-build, this should be set to the toolchain to use to build a Dart
|
|
||||||
# SDK to run on the host that targets the host. This is distinct from
|
|
||||||
# 'host_toolchain', which in a cross-build builds artifacts to run on the host
|
|
||||||
# that target the target architecture.
|
|
||||||
dart_host_sdk_toolchain = host_toolchain
|
|
||||||
}
|
|
||||||
|
|
||||||
# dart_host_toolchain should be used in the Dart tree instead of host_toolchain.
|
|
||||||
# It will ensure that we are selecting the correct host toolchain.
|
|
||||||
dart_host_toolchain = host_toolchain
|
|
||||||
if (current_toolchain == dart_host_sdk_toolchain) {
|
|
||||||
dart_host_toolchain = dart_host_sdk_toolchain
|
|
||||||
}
|
|
|
@ -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_sdk_toolchain.gni")
|
|
||||||
import("runtime_args.gni")
|
import("runtime_args.gni")
|
||||||
|
|
||||||
config("dart_public_config") {
|
config("dart_public_config") {
|
||||||
|
@ -56,7 +55,6 @@ config("dart_no_snapshot_config") {
|
||||||
config("dart_os_config") {
|
config("dart_os_config") {
|
||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
if (current_toolchain != dart_host_sdk_toolchain) {
|
|
||||||
if (target_os == "android") {
|
if (target_os == "android") {
|
||||||
defines += [ "TARGET_OS_ANDROID" ]
|
defines += [ "TARGET_OS_ANDROID" ]
|
||||||
} else if (target_os == "fuchsia") {
|
} else if (target_os == "fuchsia") {
|
||||||
|
@ -74,13 +72,11 @@ config("dart_os_config") {
|
||||||
print("Unknown target_os: $target_os")
|
print("Unknown target_os: $target_os")
|
||||||
assert(false)
|
assert(false)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config("dart_arch_config") {
|
config("dart_arch_config") {
|
||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
if (current_toolchain != dart_host_sdk_toolchain) {
|
|
||||||
if (dart_target_arch == "arm") {
|
if (dart_target_arch == "arm") {
|
||||||
defines += [ "TARGET_ARCH_ARM" ]
|
defines += [ "TARGET_ARCH_ARM" ]
|
||||||
} else if (dart_target_arch == "armv6") {
|
} else if (dart_target_arch == "armv6") {
|
||||||
|
@ -102,7 +98,6 @@ config("dart_arch_config") {
|
||||||
print("Invalid dart_target_arch: $dart_target_arch")
|
print("Invalid dart_target_arch: $dart_target_arch")
|
||||||
assert(false)
|
assert(false)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config("dart_config") {
|
config("dart_config") {
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
import("../../build/dart_host_sdk_toolchain.gni")
|
|
||||||
import("../../build/executable_suffix.gni")
|
import("../../build/executable_suffix.gni")
|
||||||
import("../../build/prebuilt_dart_sdk.gni")
|
import("../../build/prebuilt_dart_sdk.gni")
|
||||||
import("observatory_sources.gni")
|
import("observatory_sources.gni")
|
||||||
|
@ -11,10 +10,10 @@ import("observatory_sources.gni")
|
||||||
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_sdk_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",
|
||||||
|
|
|
@ -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/compiled_action.gni")
|
import("../../build/compiled_action.gni")
|
||||||
import("../../build/dart_host_sdk_toolchain.gni")
|
|
||||||
import("../../build/prebuilt_dart_sdk.gni")
|
import("../../build/prebuilt_dart_sdk.gni")
|
||||||
import("../../utils/compile_platform.gni")
|
import("../../utils/compile_platform.gni")
|
||||||
import("../../utils/generate_patch_sdk.gni")
|
import("../../utils/generate_patch_sdk.gni")
|
||||||
|
@ -85,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"
|
||||||
|
|
|
@ -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_sdk_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")
|
||||||
|
@ -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")
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
# 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_sdk_toolchain.gni")
|
|
||||||
import("../application_snapshot.gni")
|
import("../application_snapshot.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