mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 00:45:16 +00:00
[dart2wasm] Build snapshot as part of the SDK.
Change-Id: Iea75c14b6709f2347fe82af2ef226a1ed068d8a6 Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261502 Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Joshua Litt <joshualitt@google.com> Reviewed-by: Aske Simon Christensen <askesc@google.com>
This commit is contained in:
parent
e2bf48243f
commit
fd39eab463
8
BUILD.gn
8
BUILD.gn
|
@ -103,12 +103,18 @@ group("dart2js") {
|
||||||
deps = [ "utils/compiler:dart2js" ]
|
deps = [ "utils/compiler:dart2js" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
group("dart2wasm") {
|
group("dart2wasm_platform") {
|
||||||
deps = [
|
deps = [
|
||||||
":runtime_precompiled",
|
":runtime_precompiled",
|
||||||
"utils/dart2wasm:compile_dart2wasm_platform",
|
"utils/dart2wasm:compile_dart2wasm_platform",
|
||||||
"utils/dart2wasm:dart2wasm_asserts_snapshot",
|
"utils/dart2wasm:dart2wasm_asserts_snapshot",
|
||||||
"utils/dart2wasm:dart2wasm_snapshot",
|
"utils/dart2wasm:dart2wasm_snapshot",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
group("dart2wasm") {
|
||||||
|
deps = [
|
||||||
|
":dart2wasm_platform",
|
||||||
"utils/dart2wasm:test_wasm_modules",
|
"utils/dart2wasm:test_wasm_modules",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
43
sdk/BUILD.gn
43
sdk/BUILD.gn
|
@ -38,10 +38,12 @@ declare_args() {
|
||||||
# ......dartaotruntime or dartaotruntime.exe (executable)
|
# ......dartaotruntime or dartaotruntime.exe (executable)
|
||||||
# ......dart2js
|
# ......dart2js
|
||||||
# ......dartdevc
|
# ......dartdevc
|
||||||
|
# ......run_wasm.js (if not on ia32)
|
||||||
# ......utils/gen_snapshot or utils/gen_snapshot.exe (if not on ia32)
|
# ......utils/gen_snapshot or utils/gen_snapshot.exe (if not on ia32)
|
||||||
# ......snapshots/
|
# ......snapshots/
|
||||||
# ........analysis_server.dart.snapshot
|
# ........analysis_server.dart.snapshot
|
||||||
# ........dart2js.dart.snapshot
|
# ........dart2js.dart.snapshot
|
||||||
|
# ........dart2wasm.dart.snapshot (if not on ia32)
|
||||||
# ........dartdev.dart.snapshot
|
# ........dartdev.dart.snapshot
|
||||||
# ........dartdev.dill
|
# ........dartdev.dill
|
||||||
# ........dartdevc.dart.snapshot
|
# ........dartdevc.dart.snapshot
|
||||||
|
@ -67,6 +69,8 @@ declare_args() {
|
||||||
# ........dart2js_platform_unsound.dill
|
# ........dart2js_platform_unsound.dill
|
||||||
# ........dart2js_server_platform.dill
|
# ........dart2js_server_platform.dill
|
||||||
# ........dart2js_server_platform_unsound.dill
|
# ........dart2js_server_platform_unsound.dill
|
||||||
|
# ........dart2wasm_platform.dill (if not on ia32)
|
||||||
|
# ........dart2wasm_outline.dill (if not on ia32)
|
||||||
# ........vm_platform_strong.dill
|
# ........vm_platform_strong.dill
|
||||||
# ........dev_compiler/
|
# ........dev_compiler/
|
||||||
# ......async/
|
# ......async/
|
||||||
|
@ -481,6 +485,37 @@ copy("copy_dart2js_dill_files") {
|
||||||
[ "$root_out_dir/$dart_sdk_output/lib/_internal/{{source_file_part}}" ]
|
[ "$root_out_dir/$dart_sdk_output/lib/_internal/{{source_file_part}}" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copy("copy_dart2wasm_platform") {
|
||||||
|
visibility = [ ":create_full_sdk" ]
|
||||||
|
deps = [
|
||||||
|
":copy_libraries",
|
||||||
|
"../:dart2wasm_platform",
|
||||||
|
"../utils/dart2wasm:compile_dart2wasm_platform",
|
||||||
|
]
|
||||||
|
sources = [
|
||||||
|
"$root_out_dir/dart2wasm_outline.dill",
|
||||||
|
"$root_out_dir/dart2wasm_platform.dill",
|
||||||
|
]
|
||||||
|
outputs =
|
||||||
|
[ "$root_out_dir/$dart_sdk_output/lib/_internal/{{source_file_part}}" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
copy("copy_dart2wasm_runtime") {
|
||||||
|
visibility = [ ":create_full_sdk" ]
|
||||||
|
sources = [ "../pkg/dart2wasm/bin/run_wasm.js" ]
|
||||||
|
outputs = [ "$root_out_dir/$dart_sdk_output/bin/{{source_file_part}}" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
copy("copy_dart2wasm_snapshot") {
|
||||||
|
visibility = [ ":create_full_sdk" ]
|
||||||
|
deps = [
|
||||||
|
":copy_libraries",
|
||||||
|
"../utils/dart2wasm:dart2wasm_snapshot",
|
||||||
|
]
|
||||||
|
sources = [ "$root_out_dir/dart2wasm.snapshot" ]
|
||||||
|
outputs = [ "$root_out_dir/$dart_sdk_output/snapshots/{{source_file_part}}" ]
|
||||||
|
}
|
||||||
|
|
||||||
# Copies DDC's SDK weak outline .dill to lib/_internal
|
# Copies DDC's SDK weak outline .dill to lib/_internal
|
||||||
# TODO(nshahan) Fix the outline to be consistent and merge with below as a
|
# TODO(nshahan) Fix the outline to be consistent and merge with below as a
|
||||||
# breaking change.
|
# breaking change.
|
||||||
|
@ -775,6 +810,14 @@ group("create_full_sdk") {
|
||||||
":copy_full_sdk_scripts",
|
":copy_full_sdk_scripts",
|
||||||
":copy_full_sdk_snapshots",
|
":copy_full_sdk_snapshots",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
|
||||||
|
public_deps += [
|
||||||
|
":copy_dart2wasm_platform",
|
||||||
|
":copy_dart2wasm_runtime",
|
||||||
|
":copy_dart2wasm_snapshot",
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries.
|
# Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries.
|
||||||
|
|
Loading…
Reference in a new issue