[build] Remove dart_host_toolchain.

Consensus seems to be that there should be different mechanism to support host-targeting-host vs host-targeting-target configuration: comparing toolchains names won't work for that.
Also, dart_host_toolchain was set up to be used by Fuchsia, but it is no longer being used.

Change-Id: Ic2e63d8cef00b18bf6866122199027459eaf32c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118910
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
Alexander Aprelev 2019-09-27 21:14:11 +00:00 committed by commit-bot@chromium.org
parent 4aa10d0aeb
commit 34087a61ba
6 changed files with 48 additions and 92 deletions

View file

@ -3,7 +3,6 @@
# BSD-style license that can be found in the LICENSE file.
import("build/config/gclient_args.gni")
import("build/dart/dart_host_sdk_toolchain.gni")
targetting_fuchsia = target_os == "fuchsia"
@ -17,9 +16,7 @@ group("default") {
":runtime",
]
if (defined(checkout_llvm) && checkout_llvm) {
deps += [
":llvm_codegen"
]
deps += [ ":llvm_codegen" ]
}
}
@ -51,13 +48,13 @@ group("runtime") {
}
deps = [
"runtime/bin:dart",
"runtime/bin:entrypoints_verification_test_extension",
"runtime/bin:ffi_test_dynamic_library",
"runtime/bin:ffi_test_functions",
"runtime/bin:process_test",
"runtime/bin:run_vm_tests",
"runtime/bin:sample_extension",
"runtime/bin:test_extension",
"runtime/bin:entrypoints_verification_test_extension",
"runtime/bin:ffi_test_dynamic_library",
"runtime/bin:ffi_test_functions",
"runtime/vm:kernel_platform_files($host_toolchain)",
"utils/kernel-service:kernel-service",
]
@ -92,15 +89,6 @@ group("create_sdk_nnbd") {
]
}
if (defined(dart_host_sdk_toolchain) &&
dart_host_sdk_toolchain != host_toolchain) {
group("create_host_sdk") {
deps = [
"sdk:create_sdk($dart_host_sdk_toolchain)",
]
}
}
group("dart2js") {
deps = [
"utils/compiler:dart2js",
@ -142,8 +130,8 @@ group("check_llvm") {
group("llvm_codegen") {
if (defined(checkout_llvm) && checkout_llvm) {
deps = [
"runtime/llvm_codegen/codegen",
"runtime/llvm_codegen/bit",
"runtime/llvm_codegen/codegen",
]
}
}

View file

@ -3,7 +3,6 @@
# BSD-style license that can be found in the LICENSE file.
import("../executable_suffix.gni")
import("dart_host_sdk_toolchain.gni")
import("prebuilt_dart_sdk.gni")
_is_fuchsia = defined(is_fuchsia_tree) && is_fuchsia_tree
@ -62,7 +61,7 @@ template("_compiled_action") {
outputs = invoker.outputs
# Construct 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.

View file

@ -1,16 +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.
# 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
# Config variable: dart_host_sdk_toolchain
# 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.
if (defined(dart_host_sdk_toolchain) && current_toolchain == dart_host_sdk_toolchain) {
dart_host_toolchain = dart_host_sdk_toolchain
}

View file

@ -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/dart_host_sdk_toolchain.gni")
import("configs.gni")
import("runtime_args.gni")
@ -67,28 +66,22 @@ config("dart_nosnapshot_config") {
config("dart_os_config") {
defines = []
# If dart_host_toolchain is the current toolchain, and it is different from
# host_toolchain, then we are building the SDK for the host, and should not
# hardcode these defines.
if (current_toolchain != dart_host_toolchain ||
host_toolchain == dart_host_toolchain) {
if (target_os == "android") {
defines += [ "TARGET_OS_ANDROID" ]
} else if (target_os == "fuchsia") {
defines += [ "TARGET_OS_FUCHSIA" ]
} else if (target_os == "ios") {
defines += [ "TARGET_OS_MACOS" ]
defines += [ "TARGET_OS_MACOS_IOS" ]
} else if (target_os == "linux") {
defines += [ "TARGET_OS_LINUX" ]
} else if (target_os == "mac") {
defines += [ "TARGET_OS_MACOS" ]
} else if (target_os == "win") {
defines += [ "TARGET_OS_WINDOWS" ]
} else {
print("Unknown target_os: $target_os")
assert(false)
}
if (target_os == "android") {
defines += [ "TARGET_OS_ANDROID" ]
} else if (target_os == "fuchsia") {
defines += [ "TARGET_OS_FUCHSIA" ]
} else if (target_os == "ios") {
defines += [ "TARGET_OS_MACOS" ]
defines += [ "TARGET_OS_MACOS_IOS" ]
} else if (target_os == "linux") {
defines += [ "TARGET_OS_LINUX" ]
} else if (target_os == "mac") {
defines += [ "TARGET_OS_MACOS" ]
} else if (target_os == "win") {
defines += [ "TARGET_OS_WINDOWS" ]
} else {
print("Unknown target_os: $target_os")
assert(false)
}
}
@ -102,32 +95,26 @@ config("dart_os_fuchsia_config") {
config("dart_arch_config") {
defines = []
# If dart_host_toolchain is the current toolchain, and it is different from
# host_toolchain, then we are building the SDK for the host, and should not
# hardcode these defines.
if (current_toolchain != dart_host_toolchain ||
host_toolchain == dart_host_toolchain) {
if (dart_target_arch == "arm") {
defines += [ "TARGET_ARCH_ARM" ]
} else if (dart_target_arch == "armv6") {
defines += [ "TARGET_ARCH_ARM" ]
defines += [ "TARGET_ARCH_ARM_6" ]
} else if (dart_target_arch == "armv5te") {
defines += [ "TARGET_ARCH_ARM" ]
defines += [ "TARGET_ARCH_ARM_5TE" ]
} else if (dart_target_arch == "arm64") {
defines += [ "TARGET_ARCH_ARM64" ]
} else if (dart_target_arch == "x64") {
defines += [ "TARGET_ARCH_X64" ]
} else if (dart_target_arch == "ia32" || dart_target_arch == "x86") {
defines += [ "TARGET_ARCH_IA32" ]
} else if (dart_target_arch == "dbc") {
defines += [ "TARGET_ARCH_DBC" ]
defines += [ "USING_SIMULATOR" ]
} else {
print("Invalid dart_target_arch: $dart_target_arch")
assert(false)
}
if (dart_target_arch == "arm") {
defines += [ "TARGET_ARCH_ARM" ]
} else if (dart_target_arch == "armv6") {
defines += [ "TARGET_ARCH_ARM" ]
defines += [ "TARGET_ARCH_ARM_6" ]
} else if (dart_target_arch == "armv5te") {
defines += [ "TARGET_ARCH_ARM" ]
defines += [ "TARGET_ARCH_ARM_5TE" ]
} else if (dart_target_arch == "arm64") {
defines += [ "TARGET_ARCH_ARM64" ]
} else if (dart_target_arch == "x64") {
defines += [ "TARGET_ARCH_X64" ]
} else if (dart_target_arch == "ia32" || dart_target_arch == "x86") {
defines += [ "TARGET_ARCH_IA32" ]
} else if (dart_target_arch == "dbc") {
defines += [ "TARGET_ARCH_DBC" ]
defines += [ "USING_SIMULATOR" ]
} else {
print("Invalid dart_target_arch: $dart_target_arch")
assert(false)
}
}

View file

@ -78,11 +78,10 @@ template("_application_snapshot") {
# Build the kernel file using the prebuilt VM to speed up the debug and
# simulator builds.
prebuilt_dart_action(target_name + "_dill") {
deps =
extra_deps + [
"$_dart_root/runtime/vm:kernel_platform_files($dart_host_toolchain)",
"$_dart_root/runtime/vm:vm_platform",
]
deps = extra_deps + [
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
"$_dart_root/runtime/vm:vm_platform",
]
gen_kernel_script = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
platform_dill = "$root_out_dir/vm_platform_strong.dill"

View file

@ -3,7 +3,6 @@
# BSD-style license that can be found in the LICENSE file.
import("../../build/dart/dart_action.gni")
import("../../build/dart/dart_host_sdk_toolchain.gni")
import("../../runtime/runtime_args.gni")
import("../application_snapshot.gni")
@ -50,7 +49,7 @@ copy("copy_kernel-service_snapshot") {
application_snapshot("frontend_server") {
main_dart = "../../pkg/vm/bin/frontend_server_starter.dart"
deps = [
"../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
"../../runtime/vm:kernel_platform_files($host_toolchain)",
]
sdk_root = rebase_path("$root_out_dir")
training_args = [
@ -65,7 +64,7 @@ application_snapshot("frontend_server") {
template("kernel_service_dill") {
prebuilt_dart_action("kernel_service" + target_name + "_dill") {
deps = [
"../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
"../../runtime/vm:kernel_platform_files($host_toolchain)",
"../../runtime/vm:vm_platform",
]
kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"