[build] Too many deps!
- 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>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
fb2c85c973
commit
52f1a4ef54
@@ -144,10 +144,10 @@ group("dart2js") {
|
|||||||
group("dart2wasm_platform") {
|
group("dart2wasm_platform") {
|
||||||
deps = [
|
deps = [
|
||||||
":runtime_precompiled",
|
":runtime_precompiled",
|
||||||
"utils/dart2wasm:compile_dart2wasm_js_compatibility_platform",
|
"utils/dart2wasm:dart2wasm_js_compatibility_platform",
|
||||||
"utils/dart2wasm:compile_dart2wasm_platform",
|
"utils/dart2wasm:dart2wasm_platform",
|
||||||
"utils/dart2wasm:compile_dart2wasm_standalone_platform",
|
|
||||||
"utils/dart2wasm:dart2wasm_snapshot",
|
"utils/dart2wasm:dart2wasm_snapshot",
|
||||||
|
"utils/dart2wasm:dart2wasm_standalone_platform",
|
||||||
]
|
]
|
||||||
if (defined(is_product)) {
|
if (defined(is_product)) {
|
||||||
if (is_product) {
|
if (is_product) {
|
||||||
@@ -202,8 +202,8 @@ group("analysis_server") {
|
|||||||
|
|
||||||
group("tools") {
|
group("tools") {
|
||||||
deps = [
|
deps = [
|
||||||
"utils:compile_platform.exe",
|
"utils:bootstrap_compile_platform.exe",
|
||||||
"utils:gen_kernel.exe",
|
"utils:bootstrap_gen_kernel.exe",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,8 +269,8 @@ group("dartfuzz") {
|
|||||||
deps = [
|
deps = [
|
||||||
"runtime/bin:dartaotruntime",
|
"runtime/bin:dartaotruntime",
|
||||||
"runtime/bin:dartvm",
|
"runtime/bin:dartvm",
|
||||||
"utils/compiler:compile_dart2js_platform",
|
"utils/compiler:dart2js_platform",
|
||||||
"utils/dart2wasm:compile_dart2wasm_platform",
|
"utils/dart2wasm:dart2wasm_platform",
|
||||||
"utils/kernel-service",
|
"utils/kernel-service",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-32
@@ -301,19 +301,19 @@ trace to find the place to insert the appropriate support.
|
|||||||
elif arg == '../../pkg/compiler/lib/src/dart2js.dart':
|
elif arg == '../../pkg/compiler/lib/src/dart2js.dart':
|
||||||
self.entry_points.add(self.rebase(arg))
|
self.entry_points.add(self.rebase(arg))
|
||||||
return self.parse_dart2js()
|
return self.parse_dart2js()
|
||||||
elif arg == 'obj/utils/compiler/dart2js.dart.dill':
|
elif arg == 'obj/utils/compiler/dart2js.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_dart2js()
|
return self.parse_dart2js()
|
||||||
elif arg == '../../pkg/dev_compiler/bin/dartdevc.dart':
|
elif arg == '../../pkg/dev_compiler/bin/dartdevc.dart':
|
||||||
self.entry_points.add(self.rebase(arg))
|
self.entry_points.add(self.rebase(arg))
|
||||||
return self.parse_dartdevc()
|
return self.parse_dartdevc()
|
||||||
elif arg == 'obj/utils/ddc/dartdevc.dart.dill':
|
elif arg == 'obj/utils/ddc/dartdevc.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_dartdevc()
|
return self.parse_dartdevc()
|
||||||
elif arg == 'obj/utils/dartanalyzer/dartanalyzer.dart.dill':
|
elif arg == 'obj/utils/dartanalyzer/dartanalyzer.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_dartanalyzer()
|
return self.parse_dartanalyzer()
|
||||||
elif arg == 'obj/utils/analysis_server/analysis_server.dart.dill':
|
elif arg == 'obj/utils/analysis_server/analysis_server.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_analysis_server()
|
return self.parse_analysis_server()
|
||||||
elif arg == '../../pkg/front_end/tool/compile_platform.dart':
|
elif arg == '../../pkg/front_end/tool/compile_platform.dart':
|
||||||
@@ -331,28 +331,31 @@ trace to find the place to insert the appropriate support.
|
|||||||
elif arg == '../../pkg/vm/bin/gen_kernel.dart':
|
elif arg == '../../pkg/vm/bin/gen_kernel.dart':
|
||||||
self.entry_points.add(self.rebase(arg))
|
self.entry_points.add(self.rebase(arg))
|
||||||
return self.parse_gen_kernel()
|
return self.parse_gen_kernel()
|
||||||
elif arg == 'obj/utils/kernel-service/frontend_server.dart.dill':
|
elif arg == 'obj/utils/kernel-service/frontend_server.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_frontend_server()
|
return self.parse_frontend_server()
|
||||||
elif arg == 'obj/utils/dtd/generate_dtd_snapshot.dart.dill':
|
elif arg == 'obj/utils/dtd/generate_dtd_snapshot.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_generate_dtd_snapshot()
|
return self.parse_generate_dtd_snapshot()
|
||||||
elif arg == 'obj/utils/dds/generate_dds_snapshot.dart.dill':
|
elif arg == 'obj/utils/dds/generate_dds_snapshot.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_generate_dds_snapshot()
|
return self.parse_generate_dds_snapshot()
|
||||||
elif arg == 'obj/utils/bazel/kernel_worker.dart.dill':
|
elif arg == 'obj/utils/bazel/kernel_worker.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_kernel_worker()
|
return self.parse_kernel_worker()
|
||||||
elif arg == 'obj/utils/dart_runtime_service_vm/generate_dart_runtime_service_vm_snapshot.dart.dill':
|
elif arg == 'obj/utils/dart_runtime_service_vm/generate_dart_runtime_service_vm_snapshot.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_generate_dart_runtime_service_vm_snapshot()
|
return self.parse_generate_dart_runtime_service_vm_snapshot()
|
||||||
elif arg == 'obj/utils/dartdev/generate_dartdev_snapshot.dart.dill':
|
elif arg == 'obj/utils/dartdev/generate_dartdev_snapshot.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_generate_dartdev_snapshot()
|
return self.parse_generate_dartdev_snapshot()
|
||||||
elif arg == 'gen/utils/gen_kernel/bootstrap_gen_kernel.dill':
|
elif arg == 'obj/utils/bootstrap_gen_kernel.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
return self.parse_bootstrap_gen_kernel()
|
return self.parse_gen_kernel()
|
||||||
elif arg == 'obj/utils/kernel-service/kernel-service_snapshot.dart.dill':
|
elif arg == 'obj/utils/bootstrap_compile_platform.dill':
|
||||||
|
self.extra_paths.add(self.rebase(arg))
|
||||||
|
return self.parse_compile_platform()
|
||||||
|
elif arg == 'obj/utils/kernel-service/kernel-service_snapshot.jit.dill':
|
||||||
self.extra_paths.add(self.rebase(arg))
|
self.extra_paths.add(self.rebase(arg))
|
||||||
self.extra_paths.add(
|
self.extra_paths.add(
|
||||||
self.rebase(
|
self.rebase(
|
||||||
@@ -644,29 +647,13 @@ trace to find the place to insert the appropriate support.
|
|||||||
self.outputs.append(self.rebase(self.optarg))
|
self.outputs.append(self.rebase(self.optarg))
|
||||||
elif self.get_option(['--platform']):
|
elif self.get_option(['--platform']):
|
||||||
self.extra_paths.add(self.rebase(self.optarg))
|
self.extra_paths.add(self.rebase(self.optarg))
|
||||||
|
elif self.get_option(['--dynamic-interface']):
|
||||||
|
self.extra_paths.add(self.rebase(self.optarg))
|
||||||
elif self.get_option([
|
elif self.get_option([
|
||||||
'--packages', '-D', '--filesystem-root',
|
'--packages', '-D', '--filesystem-root',
|
||||||
'--filesystem-scheme'
|
'--filesystem-scheme'
|
||||||
]):
|
]):
|
||||||
pass
|
pass
|
||||||
elif arg in ['--no-aot', '--no-embed-sources']:
|
|
||||||
pass
|
|
||||||
elif not arg.startswith('-'):
|
|
||||||
self.entry_points.add(self.rebase(arg))
|
|
||||||
else:
|
|
||||||
self.unsupported('gen_kernel', arg)
|
|
||||||
|
|
||||||
def parse_bootstrap_gen_kernel(self):
|
|
||||||
while self.has_next_arg:
|
|
||||||
arg = self.next_arg()
|
|
||||||
if self.get_option(['-o', '--output']):
|
|
||||||
self.outputs.append(self.rebase(self.optarg))
|
|
||||||
elif self.get_option(['--platform']):
|
|
||||||
self.extra_paths.add(self.rebase(self.optarg))
|
|
||||||
elif self.get_option(['--dynamic-interface']):
|
|
||||||
self.extra_paths.add(self.rebase(self.optarg))
|
|
||||||
elif self.get_option(['--packages', '-D']):
|
|
||||||
pass
|
|
||||||
elif arg in [
|
elif arg in [
|
||||||
'--aot',
|
'--aot',
|
||||||
'--no-aot',
|
'--no-aot',
|
||||||
@@ -681,7 +668,7 @@ trace to find the place to insert the appropriate support.
|
|||||||
elif not arg.startswith('-'):
|
elif not arg.startswith('-'):
|
||||||
self.entry_points.add(self.rebase(arg))
|
self.entry_points.add(self.rebase(arg))
|
||||||
else:
|
else:
|
||||||
self.unsupported('bootstrap_gen_kernel', arg)
|
self.unsupported('gen_kernel', arg)
|
||||||
|
|
||||||
def parse_kernel_service_snapshot(self):
|
def parse_kernel_service_snapshot(self):
|
||||||
while self.has_next_arg:
|
while self.has_next_arg:
|
||||||
|
|||||||
@@ -163,10 +163,6 @@ template("gen_vm_platform") {
|
|||||||
}
|
}
|
||||||
compile_platform(target_name) {
|
compile_platform(target_name) {
|
||||||
output_postfix = invoker.output_postfix
|
output_postfix = invoker.output_postfix
|
||||||
if (defined(invoker.add_implicit_vm_platform_dependency)) {
|
|
||||||
add_implicit_vm_platform_dependency =
|
|
||||||
invoker.add_implicit_vm_platform_dependency
|
|
||||||
}
|
|
||||||
single_root_scheme = "org-dartlang-sdk"
|
single_root_scheme = "org-dartlang-sdk"
|
||||||
single_root_base = rebase_path("../../", root_build_dir)
|
single_root_base = rebase_path("../../", root_build_dir)
|
||||||
libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
|
libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
|
||||||
@@ -185,18 +181,15 @@ template("gen_vm_platform") {
|
|||||||
if (defined(invoker.exclude_source) && invoker.exclude_source) {
|
if (defined(invoker.exclude_source) && invoker.exclude_source) {
|
||||||
args += [ "--exclude-source" ]
|
args += [ "--exclude-source" ]
|
||||||
}
|
}
|
||||||
outline = "vm_outline" + output_postfix + ".dill"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_vm_platform("vm_platform") {
|
gen_vm_platform("vm_platform") {
|
||||||
add_implicit_vm_platform_dependency = false
|
|
||||||
exclude_source = false
|
exclude_source = false
|
||||||
output_postfix = ""
|
output_postfix = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_vm_platform("vm_platform_product") {
|
gen_vm_platform("vm_platform_product") {
|
||||||
add_implicit_vm_platform_dependency = false
|
|
||||||
exclude_source = false
|
exclude_source = false
|
||||||
output_postfix = "_product"
|
output_postfix = "_product"
|
||||||
|
|
||||||
@@ -206,7 +199,6 @@ gen_vm_platform("vm_platform_product") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gen_vm_platform("vm_platform_stripped") {
|
gen_vm_platform("vm_platform_stripped") {
|
||||||
add_implicit_vm_platform_dependency = false
|
|
||||||
exclude_source = true
|
exclude_source = true
|
||||||
output_postfix = "_stripped"
|
output_postfix = "_stripped"
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -643,8 +643,8 @@ copy("copy_dart2js_dill_files") {
|
|||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
deps = [
|
deps = [
|
||||||
":copy_libraries",
|
":copy_libraries",
|
||||||
"../utils/compiler:compile_dart2js_platform",
|
"../utils/compiler:dart2js_platform",
|
||||||
"../utils/compiler:compile_dart2js_server_platform",
|
"../utils/compiler:dart2js_server_platform",
|
||||||
]
|
]
|
||||||
sources = [
|
sources = [
|
||||||
"$root_out_dir/dart2js_platform.dill",
|
"$root_out_dir/dart2js_platform.dill",
|
||||||
@@ -659,9 +659,9 @@ copy("copy_dart2wasm_platform") {
|
|||||||
deps = [
|
deps = [
|
||||||
":copy_libraries",
|
":copy_libraries",
|
||||||
"../:dart2wasm_platform",
|
"../:dart2wasm_platform",
|
||||||
"../utils/dart2wasm:compile_dart2wasm_js_compatibility_platform",
|
"../utils/dart2wasm:dart2wasm_js_compatibility_platform",
|
||||||
"../utils/dart2wasm:compile_dart2wasm_platform",
|
"../utils/dart2wasm:dart2wasm_platform",
|
||||||
"../utils/dart2wasm:compile_dart2wasm_standalone_platform",
|
"../utils/dart2wasm:dart2wasm_standalone_platform",
|
||||||
]
|
]
|
||||||
sources = [
|
sources = [
|
||||||
"$root_out_dir/dart2wasm_js_compatibility_outline.dill",
|
"$root_out_dir/dart2wasm_js_compatibility_outline.dill",
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ declare_args() {
|
|||||||
# compile_platform.dart script instead of running it from source. This
|
# compile_platform.dart script instead of running it from source. This
|
||||||
# can significantly improve iteration time when iteration on changes in
|
# can significantly improve iteration time when iteration on changes in
|
||||||
# core libraries.
|
# core libraries.
|
||||||
|
# TODO(63495): Make this the default.
|
||||||
precompile_tools = false
|
precompile_tools = false
|
||||||
|
|
||||||
# When set to `true`, the Dart Runtime Service based implementation of the
|
# When set to `true`, the Dart Runtime Service based implementation of the
|
||||||
|
|||||||
+45
-4
@@ -7,6 +7,35 @@ import("../sdk_args.gni")
|
|||||||
|
|
||||||
_dart_root = get_path_info("..", "abspath")
|
_dart_root = get_path_info("..", "abspath")
|
||||||
|
|
||||||
|
template("kernel_compile_using_prebuilt_sdk") {
|
||||||
|
prebuilt_dart_action(target_name) {
|
||||||
|
forward_variables_from(invoker,
|
||||||
|
[
|
||||||
|
"deps",
|
||||||
|
"pool",
|
||||||
|
"testonly",
|
||||||
|
"visibility",
|
||||||
|
])
|
||||||
|
inputs = [
|
||||||
|
invoker.entry_point,
|
||||||
|
invoker.package_config,
|
||||||
|
]
|
||||||
|
|
||||||
|
outputs = [ invoker.output ]
|
||||||
|
|
||||||
|
depfile = invoker.output + ".d"
|
||||||
|
|
||||||
|
vm_args = [
|
||||||
|
"--snapshot-kind=kernel",
|
||||||
|
"--snapshot=" + rebase_path(invoker.output, root_build_dir),
|
||||||
|
"--depfile=" + rebase_path(depfile, root_build_dir),
|
||||||
|
"--packages=" + rebase_path(invoker.package_config, root_build_dir),
|
||||||
|
]
|
||||||
|
script = invoker.entry_point
|
||||||
|
args = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template("aot_compile_using_prebuilt_sdk") {
|
template("aot_compile_using_prebuilt_sdk") {
|
||||||
prebuilt_dart_action(target_name) {
|
prebuilt_dart_action(target_name) {
|
||||||
forward_variables_from(invoker,
|
forward_variables_from(invoker,
|
||||||
@@ -39,15 +68,27 @@ template("aot_compile_using_prebuilt_sdk") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aot_compile_using_prebuilt_sdk("compile_platform.exe") {
|
kernel_compile_using_prebuilt_sdk("bootstrap_compile_platform.dill") {
|
||||||
entry_point = "$_dart_root/pkg/front_end/tool/compile_platform.dart"
|
entry_point = "$_dart_root/pkg/front_end/tool/compile_platform.dart"
|
||||||
output = "$root_out_dir/compile_platform.exe"
|
output = "$target_out_dir/bootstrap_compile_platform.dill"
|
||||||
package_config = "$_dart_root/.dart_tool/package_config.json"
|
package_config = "$_dart_root/.dart_tool/package_config.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
aot_compile_using_prebuilt_sdk("gen_kernel.exe") {
|
aot_compile_using_prebuilt_sdk("bootstrap_compile_platform.exe") {
|
||||||
|
entry_point = "$_dart_root/pkg/front_end/tool/compile_platform.dart"
|
||||||
|
output = "$root_out_dir/bootstrap_compile_platform.exe"
|
||||||
|
package_config = "$_dart_root/.dart_tool/package_config.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel_compile_using_prebuilt_sdk("bootstrap_gen_kernel.dill") {
|
||||||
entry_point = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
|
entry_point = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
|
||||||
output = "$root_out_dir/gen_kernel.exe"
|
output = "$target_out_dir/bootstrap_gen_kernel.dill"
|
||||||
|
package_config = "$_dart_root/.dart_tool/package_config.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
aot_compile_using_prebuilt_sdk("bootstrap_gen_kernel.exe") {
|
||||||
|
entry_point = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
|
||||||
|
output = "$root_out_dir/bootstrap_gen_kernel.exe"
|
||||||
package_config = "$_dart_root/.dart_tool/package_config.json"
|
package_config = "$_dart_root/.dart_tool/package_config.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+111
-50
@@ -44,69 +44,130 @@ template("aot_snapshot") {
|
|||||||
output = invoker.output
|
output = invoker.output
|
||||||
}
|
}
|
||||||
|
|
||||||
dill = "$target_out_dir/$name.dart.dill"
|
dill = "$target_out_dir/$name.aot.dill"
|
||||||
unsigned_snapshot = "$target_out_dir/$name.dart.snapshot.unsigned"
|
unsigned_snapshot = "$target_out_dir/$name.dart.snapshot.unsigned"
|
||||||
signed_snapshot = output
|
signed_snapshot = output
|
||||||
|
|
||||||
# Build the kernel file using the prebuilt VM to speed up the debug and
|
# Build the kernel file using the prebuilt VM to speed up the debug and
|
||||||
# simulator builds.
|
# simulator builds.
|
||||||
kernel_label = target_name + "_dill"
|
kernel_label = target_name + "_dill"
|
||||||
prebuilt_dart_action(kernel_label) {
|
if (precompile_tools) {
|
||||||
mnemonic = "GEN_KERNEL"
|
action(kernel_label) {
|
||||||
if (defined(invoker.pool)) {
|
mnemonic = "GEN_KERNEL"
|
||||||
pool = invoker.pool
|
if (defined(invoker.pool)) {
|
||||||
}
|
pool = invoker.pool
|
||||||
deps = extra_deps + [
|
} else {
|
||||||
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
|
pool = "$_dart_root/build/dart:dart_action_pool($default_toolchain)"
|
||||||
"$_dart_root/runtime/vm:vm_platform",
|
}
|
||||||
"$_dart_root/utils/gen_kernel:bootstrap_gen_kernel",
|
|
||||||
]
|
|
||||||
gen_kernel_kernel =
|
|
||||||
get_label_info("$_dart_root/utils/gen_kernel:bootstrap_gen_kernel",
|
|
||||||
"target_gen_dir") + "/bootstrap_gen_kernel.dill"
|
|
||||||
platform_dill = "$root_out_dir/vm_platform.dill"
|
|
||||||
|
|
||||||
inputs = extra_inputs + [
|
gen_kernel_tool =
|
||||||
gen_kernel_kernel,
|
"$_dart_root/utils:bootstrap_gen_kernel.exe($host_toolchain)"
|
||||||
platform_dill,
|
gen_kernel_exe = get_label_info(gen_kernel_tool, "root_out_dir") +
|
||||||
main_dart,
|
"/bootstrap_gen_kernel.exe"
|
||||||
package_config,
|
|
||||||
|
deps = extra_deps + [
|
||||||
|
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
|
||||||
|
"$_dart_root/runtime/vm:vm_platform",
|
||||||
|
gen_kernel_tool,
|
||||||
]
|
]
|
||||||
output = dill
|
platform_dill = "$root_out_dir/vm_platform.dill"
|
||||||
outputs = [ output ]
|
|
||||||
|
|
||||||
depfile = "$output.d"
|
inputs = extra_inputs + [
|
||||||
|
gen_kernel_exe,
|
||||||
|
platform_dill,
|
||||||
|
main_dart,
|
||||||
|
package_config,
|
||||||
|
]
|
||||||
|
output = dill
|
||||||
|
outputs = [ output ]
|
||||||
|
|
||||||
vm_args = [
|
depfile = "$output.d"
|
||||||
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing
|
|
||||||
# kernel.
|
|
||||||
"-Dsdk_hash=$sdk_hash",
|
|
||||||
]
|
|
||||||
|
|
||||||
script = gen_kernel_kernel
|
script = "$_dart_root/build/gn_run_binary.py"
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
"--packages=" + rebase_path(package_config, root_build_dir),
|
rebase_path(gen_kernel_exe, root_build_dir),
|
||||||
"--platform=" + rebase_path(platform_dill, root_build_dir),
|
"--packages=" + rebase_path(package_config, root_build_dir),
|
||||||
"--aot",
|
"--platform=" + rebase_path(platform_dill, root_build_dir),
|
||||||
"--output=" + rebase_path(output, root_build_dir),
|
"--aot",
|
||||||
"--depfile=" + rebase_path(depfile, root_build_dir),
|
"--output=" + rebase_path(output, root_build_dir),
|
||||||
|
"--depfile=" + rebase_path(depfile, root_build_dir),
|
||||||
|
|
||||||
# Ensure the compiled application (e.g. kernel-service, frontend-server,
|
# Ensure the compiled application (e.g. kernel-service, frontend-server,
|
||||||
# ...) will use this SDK hash when consuming/producing kernel.
|
# ...) will use this SDK hash when consuming/producing kernel.
|
||||||
#
|
#
|
||||||
# (Instead of ensuring every user of the "application_snapshot" /
|
# (Instead of ensuring every user of the "application_snapshot" /
|
||||||
# "kernel_snapshot" passes this if needed, we always pass it)
|
# "kernel_snapshot" passes this if needed, we always pass it)
|
||||||
"-Dsdk_hash=$sdk_hash",
|
"-Dsdk_hash=$sdk_hash",
|
||||||
"-Ddart.vm.product=$product_mode",
|
"-Ddart.vm.product=$product_mode",
|
||||||
"-Ddart.vm.asan=$is_asan",
|
"-Ddart.vm.asan=$is_asan",
|
||||||
"-Ddart.vm.msan=$is_msan",
|
"-Ddart.vm.msan=$is_msan",
|
||||||
"-Ddart.vm.tsan=$is_tsan",
|
"-Ddart.vm.tsan=$is_tsan",
|
||||||
]
|
]
|
||||||
args += gen_kernel_args
|
args += gen_kernel_args
|
||||||
args += [ rebase_path(main_dart, root_build_dir) ]
|
args += [ rebase_path(main_dart, root_build_dir) ]
|
||||||
if (defined(invoker.args)) {
|
if (defined(invoker.args)) {
|
||||||
args += invoker.args
|
args += invoker.args
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
prebuilt_dart_action(kernel_label) {
|
||||||
|
mnemonic = "GEN_KERNEL"
|
||||||
|
if (defined(invoker.pool)) {
|
||||||
|
pool = invoker.pool
|
||||||
|
}
|
||||||
|
deps = extra_deps + [
|
||||||
|
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
|
||||||
|
"$_dart_root/runtime/vm:vm_platform",
|
||||||
|
"$_dart_root/utils:bootstrap_gen_kernel.dill",
|
||||||
|
]
|
||||||
|
gen_kernel_kernel =
|
||||||
|
get_label_info("$_dart_root/utils:bootstrap_gen_kernel.dill",
|
||||||
|
"target_out_dir") + "/bootstrap_gen_kernel.dill"
|
||||||
|
platform_dill = "$root_out_dir/vm_platform.dill"
|
||||||
|
|
||||||
|
inputs = extra_inputs + [
|
||||||
|
gen_kernel_kernel,
|
||||||
|
platform_dill,
|
||||||
|
main_dart,
|
||||||
|
package_config,
|
||||||
|
]
|
||||||
|
output = dill
|
||||||
|
outputs = [ output ]
|
||||||
|
|
||||||
|
depfile = "$output.d"
|
||||||
|
|
||||||
|
vm_args = [
|
||||||
|
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing
|
||||||
|
# kernel.
|
||||||
|
"-Dsdk_hash=$sdk_hash",
|
||||||
|
]
|
||||||
|
|
||||||
|
script = gen_kernel_kernel
|
||||||
|
|
||||||
|
args = [
|
||||||
|
"--packages=" + rebase_path(package_config, root_build_dir),
|
||||||
|
"--platform=" + rebase_path(platform_dill, root_build_dir),
|
||||||
|
"--aot",
|
||||||
|
"--output=" + rebase_path(output, root_build_dir),
|
||||||
|
"--depfile=" + rebase_path(depfile, root_build_dir),
|
||||||
|
|
||||||
|
# Ensure the compiled application (e.g. kernel-service, frontend-server,
|
||||||
|
# ...) will use this SDK hash when consuming/producing kernel.
|
||||||
|
#
|
||||||
|
# (Instead of ensuring every user of the "application_snapshot" /
|
||||||
|
# "kernel_snapshot" passes this if needed, we always pass it)
|
||||||
|
"-Dsdk_hash=$sdk_hash",
|
||||||
|
"-Ddart.vm.product=$product_mode",
|
||||||
|
"-Ddart.vm.asan=$is_asan",
|
||||||
|
"-Ddart.vm.msan=$is_msan",
|
||||||
|
"-Ddart.vm.tsan=$is_tsan",
|
||||||
|
]
|
||||||
|
args += gen_kernel_args
|
||||||
|
args += [ rebase_path(main_dart, root_build_dir) ]
|
||||||
|
if (defined(invoker.args)) {
|
||||||
|
args += invoker.args
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+126
-68
@@ -117,89 +117,151 @@ template("application_snapshot") {
|
|||||||
gen_kernel_args += invoker.gen_kernel_args
|
gen_kernel_args += invoker.gen_kernel_args
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build the kernel file using the prebuilt VM to speed up the debug and
|
if (precompile_tools) {
|
||||||
# simulator builds.
|
action(target_name + "_dill") {
|
||||||
prebuilt_dart_action(target_name + "_dill") {
|
mnemonic = "GEN_KERNEL"
|
||||||
mnemonic = "GEN_KERNEL"
|
if (defined(invoker.pool)) {
|
||||||
if (defined(invoker.pool)) {
|
pool = invoker.pool
|
||||||
pool = invoker.pool
|
} else {
|
||||||
}
|
pool = "$_dart_root/build/dart:dart_action_pool($default_toolchain)"
|
||||||
deps = extra_deps + [
|
}
|
||||||
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
|
|
||||||
"$_dart_root/runtime/vm:vm_platform",
|
|
||||||
"$_dart_root/utils/gen_kernel:bootstrap_gen_kernel",
|
|
||||||
]
|
|
||||||
gen_kernel_kernel =
|
|
||||||
get_label_info("$_dart_root/utils/gen_kernel:bootstrap_gen_kernel",
|
|
||||||
"target_gen_dir") + "/bootstrap_gen_kernel.dill"
|
|
||||||
platform_dill = "$root_out_dir/vm_platform.dill"
|
|
||||||
|
|
||||||
inputs = extra_inputs + [
|
gen_kernel_tool = "$_dart_root/utils:bootstrap_gen_kernel.exe"
|
||||||
gen_kernel_kernel,
|
gen_kernel_exe = get_label_info(gen_kernel_tool, "root_out_dir") +
|
||||||
platform_dill,
|
"/bootstrap_gen_kernel.exe"
|
||||||
main_dart,
|
|
||||||
package_config,
|
deps = extra_deps + [
|
||||||
|
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
|
||||||
|
"$_dart_root/runtime/vm:vm_platform",
|
||||||
|
gen_kernel_tool,
|
||||||
]
|
]
|
||||||
output = "$target_out_dir/$name.dart.dill"
|
platform_dill = "$root_out_dir/vm_platform.dill"
|
||||||
outputs = [ output ]
|
|
||||||
|
|
||||||
depfile = "$output.d"
|
inputs = extra_inputs + [
|
||||||
|
gen_kernel_exe,
|
||||||
|
platform_dill,
|
||||||
|
main_dart,
|
||||||
|
package_config,
|
||||||
|
]
|
||||||
|
output = "$target_out_dir/$name.jit.dill"
|
||||||
|
outputs = [ output ]
|
||||||
|
|
||||||
vm_args = [
|
depfile = "$output.d"
|
||||||
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing
|
|
||||||
# kernel.
|
|
||||||
"-Dsdk_hash=$sdk_hash",
|
|
||||||
]
|
|
||||||
|
|
||||||
script = gen_kernel_kernel
|
script = "$_dart_root/build/gn_run_binary.py"
|
||||||
is_product_flag = dart_runtime_mode == "release"
|
is_product_flag = dart_runtime_mode == "release"
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
"--packages=" + rebase_path(package_config, root_build_dir),
|
rebase_path(gen_kernel_exe, root_build_dir),
|
||||||
"--platform=" + rebase_path(platform_dill, root_build_dir),
|
"--packages=" + rebase_path(package_config, root_build_dir),
|
||||||
"--no-aot",
|
"--platform=" + rebase_path(platform_dill, root_build_dir),
|
||||||
"--no-embed-sources",
|
"--no-aot",
|
||||||
"--no-link-platform",
|
"--no-embed-sources",
|
||||||
"--output=" + rebase_path(output, root_build_dir),
|
"--no-link-platform",
|
||||||
"--depfile=" + rebase_path(depfile, root_build_dir),
|
"--output=" + rebase_path(output, root_build_dir),
|
||||||
|
"--depfile=" + rebase_path(depfile, root_build_dir),
|
||||||
|
|
||||||
# Ensure the compiled application (e.g. kernel-service, frontend-server,
|
# Ensure the compiled application (e.g. kernel-service, frontend-server,
|
||||||
# ...) will use this SDK hash when consuming/producing kernel.
|
# ...) will use this SDK hash when consuming/producing kernel.
|
||||||
#
|
#
|
||||||
# (Instead of ensuring every user of the "application_snapshot" /
|
# (Instead of ensuring every user of the "application_snapshot" /
|
||||||
# "kernel_snapshot" passes this if needed, we always pass it)
|
# "kernel_snapshot" passes this if needed, we always pass it)
|
||||||
"-Dsdk_hash=$sdk_hash",
|
"-Dsdk_hash=$sdk_hash",
|
||||||
"-Ddart.vm.product=$is_product_flag",
|
"-Ddart.vm.product=$is_product_flag",
|
||||||
"-Ddart.vm.asan=$is_asan",
|
"-Ddart.vm.asan=$is_asan",
|
||||||
"-Ddart.vm.msan=$is_msan",
|
"-Ddart.vm.msan=$is_msan",
|
||||||
"-Ddart.vm.tsan=$is_tsan",
|
"-Ddart.vm.tsan=$is_tsan",
|
||||||
]
|
]
|
||||||
args += gen_kernel_args
|
args += gen_kernel_args
|
||||||
args += [ rebase_path(main_dart, root_build_dir) ]
|
args += [ rebase_path(main_dart, root_build_dir) ]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
prebuilt_dart_action(target_name + "_dill") {
|
||||||
|
mnemonic = "GEN_KERNEL"
|
||||||
|
if (defined(invoker.pool)) {
|
||||||
|
pool = invoker.pool
|
||||||
|
}
|
||||||
|
deps = extra_deps + [
|
||||||
|
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
|
||||||
|
"$_dart_root/runtime/vm:vm_platform",
|
||||||
|
"$_dart_root/utils:bootstrap_gen_kernel.dill",
|
||||||
|
]
|
||||||
|
gen_kernel_kernel =
|
||||||
|
get_label_info("$_dart_root/utils:bootstrap_gen_kernel.dill",
|
||||||
|
"target_out_dir") + "/bootstrap_gen_kernel.dill"
|
||||||
|
platform_dill = "$root_out_dir/vm_platform.dill"
|
||||||
|
|
||||||
|
inputs = extra_inputs + [
|
||||||
|
gen_kernel_kernel,
|
||||||
|
platform_dill,
|
||||||
|
main_dart,
|
||||||
|
package_config,
|
||||||
|
]
|
||||||
|
output = "$target_out_dir/$name.jit.dill"
|
||||||
|
outputs = [ output ]
|
||||||
|
|
||||||
|
depfile = "$output.d"
|
||||||
|
|
||||||
|
vm_args = [
|
||||||
|
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing
|
||||||
|
# kernel.
|
||||||
|
"-Dsdk_hash=$sdk_hash",
|
||||||
|
]
|
||||||
|
|
||||||
|
script = gen_kernel_kernel
|
||||||
|
is_product_flag = dart_runtime_mode == "release"
|
||||||
|
|
||||||
|
args = [
|
||||||
|
"--packages=" + rebase_path(package_config, root_build_dir),
|
||||||
|
"--platform=" + rebase_path(platform_dill, root_build_dir),
|
||||||
|
"--no-aot",
|
||||||
|
"--no-embed-sources",
|
||||||
|
"--no-link-platform",
|
||||||
|
"--output=" + rebase_path(output, root_build_dir),
|
||||||
|
"--depfile=" + rebase_path(depfile, root_build_dir),
|
||||||
|
|
||||||
|
# Ensure the compiled application (e.g. kernel-service, frontend-server,
|
||||||
|
# ...) will use this SDK hash when consuming/producing kernel.
|
||||||
|
#
|
||||||
|
# (Instead of ensuring every user of the "application_snapshot" /
|
||||||
|
# "kernel_snapshot" passes this if needed, we always pass it)
|
||||||
|
"-Dsdk_hash=$sdk_hash",
|
||||||
|
"-Ddart.vm.product=$is_product_flag",
|
||||||
|
"-Ddart.vm.asan=$is_asan",
|
||||||
|
"-Ddart.vm.msan=$is_msan",
|
||||||
|
"-Ddart.vm.tsan=$is_tsan",
|
||||||
|
]
|
||||||
|
args += gen_kernel_args
|
||||||
|
args += [ rebase_path(main_dart, root_build_dir) ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a snapshot from kernel built above.
|
# Create a snapshot from kernel built above.
|
||||||
if (dart_snapshot_kind == "kernel") {
|
if (dart_snapshot_kind == "kernel") {
|
||||||
copy(target_name) {
|
copy(target_name) {
|
||||||
deps = extra_deps + [ ":${target_name}_dill" ]
|
deps = extra_deps + [ ":${target_name}_dill" ]
|
||||||
sources = [ "$target_out_dir/$name.dart.dill" ]
|
sources = [ "$target_out_dir/$name.jit.dill" ]
|
||||||
outputs = [ output ]
|
outputs = [ output ]
|
||||||
|
|
||||||
assert(snapshot_vm_args != "", "Ignoring unused argument")
|
not_needed([
|
||||||
assert(training_args != "", "Ignoring unused argument")
|
"snapshot_vm_args",
|
||||||
assert(training_inputs != "", "Ignoring unused argument")
|
"training_args",
|
||||||
assert(training_deps != "", "Ignoring unused argument")
|
"training_inputs",
|
||||||
|
"training_deps",
|
||||||
|
])
|
||||||
}
|
}
|
||||||
} else {
|
} else if (dart_snapshot_kind == "app-jit") {
|
||||||
dart_action(target_name) {
|
dart_action(target_name) {
|
||||||
mnemonic = "APP_JIT"
|
mnemonic = "APP_JIT"
|
||||||
if (defined(invoker.pool)) {
|
if (defined(invoker.pool)) {
|
||||||
pool = invoker.pool
|
pool = invoker.pool
|
||||||
}
|
}
|
||||||
deps = extra_deps + [ ":${target_name}_dill" ] + training_deps
|
deps = extra_deps + [ ":${target_name}_dill" ] + training_deps
|
||||||
depfile = "$output.d"
|
|
||||||
|
|
||||||
script = "$target_out_dir/$name.dart.dill"
|
# No depfile needed when running from a kernel file. The set of inputs is
|
||||||
|
# known at GN time.
|
||||||
|
|
||||||
|
script = "$target_out_dir/$name.jit.dill"
|
||||||
|
|
||||||
inputs = extra_inputs + training_inputs
|
inputs = extra_inputs + training_inputs
|
||||||
|
|
||||||
@@ -212,16 +274,12 @@ template("application_snapshot") {
|
|||||||
vm_args = [
|
vm_args = [
|
||||||
"--deterministic",
|
"--deterministic",
|
||||||
"--packages=" + rebase_path(package_config, root_build_dir),
|
"--packages=" + rebase_path(package_config, root_build_dir),
|
||||||
|
"--snapshot-kind=app-jit",
|
||||||
"--snapshot=" + rebase_path(output, root_build_dir),
|
"--snapshot=" + rebase_path(output, root_build_dir),
|
||||||
"--snapshot-depfile=" + rebase_path(depfile, root_build_dir),
|
|
||||||
] + snapshot_vm_args
|
] + snapshot_vm_args
|
||||||
|
args = training_args
|
||||||
if (dart_snapshot_kind == "app-jit") {
|
|
||||||
vm_args += [ "--snapshot-kind=app-jit" ]
|
|
||||||
args = training_args
|
|
||||||
} else {
|
|
||||||
assert(false, "Bad dart_snapshot_kind: $dart_snapshot_kind")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
assert(false, "Unknown snapshot_kind: $dart_snapshot_kind")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+60
-79
@@ -23,32 +23,71 @@ template("compile_platform") {
|
|||||||
assert(!defined(invoker.script), "Remove 'script' from $target_name")
|
assert(!defined(invoker.script), "Remove 'script' from $target_name")
|
||||||
assert(!defined(invoker.depfile), "Remove 'depfile' from $target_name")
|
assert(!defined(invoker.depfile), "Remove 'depfile' from $target_name")
|
||||||
|
|
||||||
# In order to automatically compute dependencies, we need to add a dependency
|
|
||||||
# on vm_outline.dill. This is used to include the source code of Fasta itself
|
|
||||||
# in the dependency file. Without this, a change to Fasta wouldn't cause the
|
|
||||||
# platform dill files to be rebuilt. However, when building
|
|
||||||
# vm_outline.dill, we shouldn't list it as a dependency as this would
|
|
||||||
# lead to cyclic dependencies.
|
|
||||||
add_implicit_vm_platform_dependency = true
|
|
||||||
if (defined(invoker.add_implicit_vm_platform_dependency)) {
|
|
||||||
add_implicit_vm_platform_dependency =
|
|
||||||
invoker.add_implicit_vm_platform_dependency
|
|
||||||
}
|
|
||||||
|
|
||||||
outline = "vm_outline.dill"
|
|
||||||
if (defined(invoker.outline)) {
|
|
||||||
outline = invoker.outline
|
|
||||||
}
|
|
||||||
|
|
||||||
if (precompile_tools) {
|
if (precompile_tools) {
|
||||||
action(target_name) {
|
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)) {
|
if (defined(invoker.pool)) {
|
||||||
pool = invoker.pool
|
pool = invoker.pool
|
||||||
}
|
}
|
||||||
|
|
||||||
outputs = invoker.outputs
|
compile_platform_tool =
|
||||||
|
"$_dart_root/utils:bootstrap_compile_platform.dill($host_toolchain)"
|
||||||
|
|
||||||
compile_platform_tool = "//utils:compile_platform.exe($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 ]
|
deps = [ compile_platform_tool ]
|
||||||
if (defined(invoker.deps)) {
|
if (defined(invoker.deps)) {
|
||||||
@@ -60,19 +99,7 @@ template("compile_platform") {
|
|||||||
inputs += invoker.inputs
|
inputs += invoker.inputs
|
||||||
}
|
}
|
||||||
|
|
||||||
if (add_implicit_vm_platform_dependency) {
|
args = invoker.args
|
||||||
inputs += [ "$root_out_dir/$outline" ]
|
|
||||||
deps += [ "$_dart_root/runtime/vm:vm_platform" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
depfile = outputs[0] + ".d"
|
|
||||||
|
|
||||||
script = "$_dart_root/build/gn_run_binary.py"
|
|
||||||
args =
|
|
||||||
[ rebase_path(get_label_info(compile_platform_tool, "root_out_dir") +
|
|
||||||
"/compile_platform.exe",
|
|
||||||
root_build_dir) ]
|
|
||||||
args += invoker.args
|
|
||||||
if (defined(invoker.single_root_scheme)) {
|
if (defined(invoker.single_root_scheme)) {
|
||||||
args += [ "--single-root-scheme=" + invoker.single_root_scheme ]
|
args += [ "--single-root-scheme=" + invoker.single_root_scheme ]
|
||||||
}
|
}
|
||||||
@@ -85,53 +112,7 @@ template("compile_platform") {
|
|||||||
args +=
|
args +=
|
||||||
[ rebase_path(invoker.libraries_specification_uri, root_build_dir) ]
|
[ rebase_path(invoker.libraries_specification_uri, root_build_dir) ]
|
||||||
}
|
}
|
||||||
args += [ rebase_path("$root_out_dir/$outline", root_build_dir) ]
|
args += [ "unused-vm-platform.dill" ]
|
||||||
args += rebase_path(outputs, root_build_dir)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
prebuilt_dart_action(target_name) {
|
|
||||||
if (defined(invoker.pool)) {
|
|
||||||
pool = invoker.pool
|
|
||||||
}
|
|
||||||
script = "$_dart_root/pkg/front_end/tool/compile_platform.dart"
|
|
||||||
|
|
||||||
packages = "$_dart_root/.dart_tool/package_config.json"
|
|
||||||
|
|
||||||
outputs = invoker.outputs
|
|
||||||
|
|
||||||
vm_args = [ "-Dsdk_hash=$sdk_hash" ]
|
|
||||||
|
|
||||||
inputs = []
|
|
||||||
deps = []
|
|
||||||
args = []
|
|
||||||
if (defined(invoker.deps)) {
|
|
||||||
deps += invoker.deps
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defined(invoker.inputs)) {
|
|
||||||
inputs += invoker.inputs
|
|
||||||
}
|
|
||||||
|
|
||||||
if (add_implicit_vm_platform_dependency) {
|
|
||||||
inputs += [ "$root_out_dir/$outline" ]
|
|
||||||
deps += [ "$_dart_root/runtime/vm:vm_platform" ]
|
|
||||||
}
|
|
||||||
depfile = outputs[0] + ".d"
|
|
||||||
|
|
||||||
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 += [ rebase_path("$root_out_dir/$outline", root_build_dir) ]
|
|
||||||
args += rebase_path(outputs, root_build_dir)
|
args += rebase_path(outputs, root_build_dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ sdk_root = "../../sdk"
|
|||||||
|
|
||||||
application_snapshot("dart2js") {
|
application_snapshot("dart2js") {
|
||||||
deps = [ ":dart2js_create_snapshot_entry" ]
|
deps = [ ":dart2js_create_snapshot_entry" ]
|
||||||
training_deps = [ ":compile_dart2js_platform" ]
|
training_deps = [ ":dart2js_platform" ]
|
||||||
training_inputs = [
|
training_inputs = [
|
||||||
"$root_out_dir/dart2js_platform.dill",
|
"$root_out_dir/dart2js_platform.dill",
|
||||||
"$root_out_dir/dart2js_outline.dill",
|
"$root_out_dir/dart2js_outline.dill",
|
||||||
@@ -106,7 +106,7 @@ aot_snapshot("dart2js_sdk_aot_product") {
|
|||||||
force_product_mode = !dart_debug
|
force_product_mode = !dart_debug
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_platform("compile_dart2js_platform") {
|
compile_platform("dart2js_platform") {
|
||||||
single_root_scheme = "org-dartlang-sdk"
|
single_root_scheme = "org-dartlang-sdk"
|
||||||
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
||||||
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
||||||
@@ -122,7 +122,7 @@ compile_platform("compile_dart2js_platform") {
|
|||||||
"dart:core",
|
"dart:core",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
compile_platform("compile_dart2js_server_platform") {
|
compile_platform("dart2js_server_platform") {
|
||||||
single_root_scheme = "org-dartlang-sdk"
|
single_root_scheme = "org-dartlang-sdk"
|
||||||
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
||||||
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ aot_snapshot("dart2wasm_product_snapshot") {
|
|||||||
force_product_mode = true
|
force_product_mode = true
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_platform("compile_dart2wasm_platform") {
|
compile_platform("dart2wasm_platform") {
|
||||||
single_root_scheme = "org-dartlang-sdk"
|
single_root_scheme = "org-dartlang-sdk"
|
||||||
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
||||||
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
||||||
@@ -57,7 +57,7 @@ compile_platform("compile_dart2wasm_platform") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_platform("compile_dart2wasm_js_compatibility_platform") {
|
compile_platform("dart2wasm_js_compatibility_platform") {
|
||||||
single_root_scheme = "org-dartlang-sdk"
|
single_root_scheme = "org-dartlang-sdk"
|
||||||
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
||||||
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
||||||
@@ -74,7 +74,7 @@ compile_platform("compile_dart2wasm_js_compatibility_platform") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_platform("compile_dart2wasm_standalone_platform") {
|
compile_platform("dart2wasm_standalone_platform") {
|
||||||
single_root_scheme = "org-dartlang-sdk"
|
single_root_scheme = "org-dartlang-sdk"
|
||||||
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
single_root_base = rebase_path("$sdk_root/", root_build_dir)
|
||||||
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ template("compile_dart2wasm") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"../dart2wasm:compile_dart2wasm_platform",
|
"../dart2wasm:dart2wasm_platform",
|
||||||
"../dart2wasm:dart2wasm_snapshot",
|
"../dart2wasm:dart2wasm_snapshot",
|
||||||
]
|
]
|
||||||
if (product_mode) {
|
if (product_mode) {
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ template("dart2js_compile") {
|
|||||||
|
|
||||||
prebuilt_dart_action(target_name) {
|
prebuilt_dart_action(target_name) {
|
||||||
mnemonic = "DART2JS"
|
mnemonic = "DART2JS"
|
||||||
deps = invoker.deps + [ "../compiler:compile_dart2js_platform" ]
|
deps = invoker.deps + [ "../compiler:dart2js_platform" ]
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
"$root_out_dir/dart2js_platform.dill",
|
"$root_out_dir/dart2js_platform.dill",
|
||||||
|
|||||||
@@ -2,44 +2,7 @@
|
|||||||
# 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/dart_action.gni")
|
|
||||||
import("../../runtime/runtime_args.gni")
|
import("../../runtime/runtime_args.gni")
|
||||||
import("../../sdk_args.gni")
|
|
||||||
|
|
||||||
_dart_root = get_path_info("../..", "abspath")
|
|
||||||
|
|
||||||
prebuilt_dart_action("bootstrap_gen_kernel") {
|
|
||||||
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.dill"
|
|
||||||
package_config = rebase_path("$_dart_root/.dart_tool/package_config.json")
|
|
||||||
|
|
||||||
inputs = [
|
|
||||||
gen_kernel_script,
|
|
||||||
platform_dill,
|
|
||||||
package_config,
|
|
||||||
]
|
|
||||||
output = "$target_gen_dir/bootstrap_gen_kernel.dill"
|
|
||||||
outputs = [ output ]
|
|
||||||
|
|
||||||
depfile = "$output.d"
|
|
||||||
vm_args = [
|
|
||||||
"--snapshot-kind=kernel",
|
|
||||||
"--snapshot=" + rebase_path(output, root_build_dir),
|
|
||||||
"--depfile=" + rebase_path(depfile, root_build_dir),
|
|
||||||
|
|
||||||
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing kernel.
|
|
||||||
"-Dsdk_hash=$sdk_hash",
|
|
||||||
|
|
||||||
"--packages=" + rebase_path(package_config, root_build_dir),
|
|
||||||
]
|
|
||||||
script = gen_kernel_script
|
|
||||||
args = []
|
|
||||||
}
|
|
||||||
|
|
||||||
import("../aot_snapshot.gni")
|
import("../aot_snapshot.gni")
|
||||||
|
|
||||||
aot_snapshot("gen_kernel") {
|
aot_snapshot("gen_kernel") {
|
||||||
|
|||||||
@@ -92,9 +92,12 @@ template("kernel_service_dill") {
|
|||||||
action("kernel_service" + target_name + "_dill") {
|
action("kernel_service" + target_name + "_dill") {
|
||||||
if (defined(invoker.pool)) {
|
if (defined(invoker.pool)) {
|
||||||
pool = invoker.pool
|
pool = invoker.pool
|
||||||
|
} else {
|
||||||
|
pool = "$_dart_root/build/dart:dart_action_pool($default_toolchain)"
|
||||||
}
|
}
|
||||||
|
|
||||||
gen_kernel_tool = "//utils:gen_kernel.exe($host_toolchain)"
|
gen_kernel_tool =
|
||||||
|
"$_dart_root/utils:bootstrap_gen_kernel.exe($host_toolchain)"
|
||||||
kernel_service_script = "../../$_kernel_service_script"
|
kernel_service_script = "../../$_kernel_service_script"
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
@@ -113,7 +116,7 @@ template("kernel_service_dill") {
|
|||||||
|
|
||||||
script = "$_dart_root/build/gn_run_binary.py"
|
script = "$_dart_root/build/gn_run_binary.py"
|
||||||
args = [ rebase_path(get_label_info(gen_kernel_tool, "root_out_dir") +
|
args = [ rebase_path(get_label_info(gen_kernel_tool, "root_out_dir") +
|
||||||
"/gen_kernel.exe",
|
"/bootstrap_gen_kernel.exe",
|
||||||
root_build_dir) ]
|
root_build_dir) ]
|
||||||
args += invoker.extra_args
|
args += invoker.extra_args
|
||||||
args += [
|
args += [
|
||||||
|
|||||||
Reference in New Issue
Block a user