52f1a4ef54
- Break false dependency of non-VM platforms on VM platform - Break false dependency of bootstrap gen_kernel on VM platform - Extend precompile_tools to gen_kernel steps - Rename intermediate kernel files so JIT versus AOT is visible in ninjatracing TEST=ci Change-Id: I07011abe8303597af61d2b8c73e788b661482cc0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510060 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
120 lines
3.8 KiB
Plaintext
120 lines
3.8 KiB
Plaintext
# 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.
|
|
|
|
import("../build/dart/dart_action.gni")
|
|
import("../sdk_args.gni")
|
|
|
|
_dart_root = get_path_info("..", "abspath")
|
|
|
|
template("compile_platform") {
|
|
assert(defined(invoker.libraries_specification_uri),
|
|
"Need 'libraries_specification_uri' in $target_name")
|
|
assert(defined(invoker.outputs), "Need 'outputs' in $target_name")
|
|
assert(defined(invoker.args), "Need 'args' in $target_name")
|
|
if (defined(invoker.single_root_scheme)) {
|
|
assert(defined(invoker.single_root_base),
|
|
"Need 'single_root_base' in $target_name")
|
|
}
|
|
if (defined(invoker.single_root_base)) {
|
|
assert(defined(invoker.single_root_scheme),
|
|
"Need 'single_root_scheme' in $target_name")
|
|
}
|
|
assert(!defined(invoker.script), "Remove 'script' from $target_name")
|
|
assert(!defined(invoker.depfile), "Remove 'depfile' from $target_name")
|
|
|
|
if (precompile_tools) {
|
|
action(target_name) {
|
|
mnemonic = "COMPILE_PLATFORM"
|
|
|
|
if (defined(invoker.pool)) {
|
|
pool = invoker.pool
|
|
} else {
|
|
pool = "$_dart_root/build/dart:dart_action_pool($default_toolchain)"
|
|
}
|
|
|
|
outputs = invoker.outputs
|
|
depfile = outputs[0] + ".d"
|
|
|
|
compile_platform_tool =
|
|
"$_dart_root/utils:bootstrap_compile_platform.exe($host_toolchain)"
|
|
compile_platform_exe =
|
|
get_label_info(compile_platform_tool, "root_out_dir") +
|
|
"/bootstrap_compile_platform.exe"
|
|
|
|
deps = [ compile_platform_tool ]
|
|
if (defined(invoker.deps)) {
|
|
deps += invoker.deps
|
|
}
|
|
|
|
inputs = [ compile_platform_exe ]
|
|
if (defined(invoker.inputs)) {
|
|
inputs += invoker.inputs
|
|
}
|
|
|
|
script = "$_dart_root/build/gn_run_binary.py"
|
|
args = [ rebase_path(compile_platform_exe, root_build_dir) ]
|
|
args += invoker.args
|
|
if (defined(invoker.single_root_scheme)) {
|
|
args += [ "--single-root-scheme=" + invoker.single_root_scheme ]
|
|
}
|
|
if (defined(invoker.single_root_base)) {
|
|
args += [ "--single-root-base=" + invoker.single_root_base ]
|
|
}
|
|
if (defined(invoker.single_root_scheme)) {
|
|
args += [ invoker.libraries_specification_uri ]
|
|
} else {
|
|
args +=
|
|
[ rebase_path(invoker.libraries_specification_uri, root_build_dir) ]
|
|
}
|
|
args += [ "unused-vm-platform.dill" ]
|
|
args += rebase_path(outputs, root_build_dir)
|
|
}
|
|
} else {
|
|
prebuilt_dart_action(target_name) {
|
|
mnemonic = "COMPILE_PLATFORM"
|
|
|
|
if (defined(invoker.pool)) {
|
|
pool = invoker.pool
|
|
}
|
|
|
|
compile_platform_tool =
|
|
"$_dart_root/utils:bootstrap_compile_platform.dill($host_toolchain)"
|
|
|
|
script = get_label_info(compile_platform_tool, "target_out_dir") +
|
|
"/bootstrap_compile_platform.dill"
|
|
|
|
outputs = invoker.outputs
|
|
depfile = outputs[0] + ".d"
|
|
|
|
vm_args = [ "-Dsdk_hash=$sdk_hash" ]
|
|
|
|
deps = [ compile_platform_tool ]
|
|
if (defined(invoker.deps)) {
|
|
deps += invoker.deps
|
|
}
|
|
|
|
inputs = []
|
|
if (defined(invoker.inputs)) {
|
|
inputs += invoker.inputs
|
|
}
|
|
|
|
args = invoker.args
|
|
if (defined(invoker.single_root_scheme)) {
|
|
args += [ "--single-root-scheme=" + invoker.single_root_scheme ]
|
|
}
|
|
if (defined(invoker.single_root_base)) {
|
|
args += [ "--single-root-base=" + invoker.single_root_base ]
|
|
}
|
|
if (defined(invoker.single_root_scheme)) {
|
|
args += [ invoker.libraries_specification_uri ]
|
|
} else {
|
|
args +=
|
|
[ rebase_path(invoker.libraries_specification_uri, root_build_dir) ]
|
|
}
|
|
args += [ "unused-vm-platform.dill" ]
|
|
args += rebase_path(outputs, root_build_dir)
|
|
}
|
|
}
|
|
}
|