mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 22:28:34 +00:00
Revert "[dartdev] Convert gen_kernel.dart.snapshot into an AOT snapshot"
This reverts commit 0f8069d9d0
.
Reason for revert: Broke the following builds:
* vm-appjit-linux-product-x64
* vm-aot-*-product-*
* vm-ffi-android-product-*
as well as the following tests:
* pkg/dartdev/test/commands/compile_test
* pkg/vm_snapshot_analysis/test/instruction_sizes_test
* pkg/vm_snapshot_analysis/test/precompiler_trace_test
Original change's description:
> [dartdev] Convert gen_kernel.dart.snapshot into an AOT snapshot
>
> Convert gen_kernel to use an AOT snapshot in the
> dart compile exe
> command.
>
> TEST=ci
>
> Change-Id: I6e338525dabb4e84dc1edff8f0bbac803223e74d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327520
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
Change-Id: Ia7225516a17cab52c8506abee05ce0935941f1cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327641
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This commit is contained in:
parent
d7b522508e
commit
03c2003222
|
@ -13,7 +13,7 @@ final String executableSuffix = Platform.isWindows ? '.exe' : '';
|
||||||
final String dartaotruntime =
|
final String dartaotruntime =
|
||||||
path.join(binDir.path, 'dartaotruntime$executableSuffix');
|
path.join(binDir.path, 'dartaotruntime$executableSuffix');
|
||||||
final String genKernel =
|
final String genKernel =
|
||||||
path.join(binDir.path, 'snapshots', 'gen_kernel_aot.dart.snapshot');
|
path.join(binDir.path, 'snapshots', 'gen_kernel.dart.snapshot');
|
||||||
final String genSnapshot =
|
final String genSnapshot =
|
||||||
path.join(binDir.path, 'utils', 'gen_snapshot$executableSuffix');
|
path.join(binDir.path, 'utils', 'gen_snapshot$executableSuffix');
|
||||||
final String productPlatformDill = path.join(
|
final String productPlatformDill = path.join(
|
||||||
|
@ -63,7 +63,7 @@ Future<void> generateNative({
|
||||||
|
|
||||||
final String kernelFile = path.join(tempDir.path, 'kernel.dill');
|
final String kernelFile = path.join(tempDir.path, 'kernel.dill');
|
||||||
final kernelResult = await generateAotKernel(
|
final kernelResult = await generateAotKernel(
|
||||||
dartaotruntime,
|
Platform.executable,
|
||||||
genKernel,
|
genKernel,
|
||||||
productPlatformDill,
|
productPlatformDill,
|
||||||
sourcePath,
|
sourcePath,
|
||||||
|
|
|
@ -49,7 +49,7 @@ declare_args() {
|
||||||
# ........dds.dart.snapshot
|
# ........dds.dart.snapshot
|
||||||
# ........frontend_server_aot.dart.snapshot (AOT snapshot, if not on ia32)
|
# ........frontend_server_aot.dart.snapshot (AOT snapshot, if not on ia32)
|
||||||
# ........frontend_server.dart.snapshot
|
# ........frontend_server.dart.snapshot
|
||||||
# ........gen_kernel_aot.dart.snapshot (if not on ia32)
|
# ........gen_kernel.dart.snapshot (if not on ia32)
|
||||||
# ........kernel-service.dart.snapshot
|
# ........kernel-service.dart.snapshot
|
||||||
# ........kernel_worker.dart.snapshot
|
# ........kernel_worker.dart.snapshot
|
||||||
# ......resources/
|
# ......resources/
|
||||||
|
@ -358,7 +358,7 @@ copy("copy_vm_platform_strong_product") {
|
||||||
copy("copy_gen_kernel_snapshot") {
|
copy("copy_gen_kernel_snapshot") {
|
||||||
visibility = [ ":group_dart2native" ]
|
visibility = [ ":group_dart2native" ]
|
||||||
deps = [ "../utils/gen_kernel" ]
|
deps = [ "../utils/gen_kernel" ]
|
||||||
sources = [ "$root_gen_dir/gen_kernel_aot.dart.snapshot" ]
|
sources = [ "$root_gen_dir/gen_kernel.dart.snapshot" ]
|
||||||
outputs =
|
outputs =
|
||||||
[ "$root_out_dir/$dart_sdk_output/bin/snapshots/{{source_file_part}}" ]
|
[ "$root_out_dir/$dart_sdk_output/bin/snapshots/{{source_file_part}}" ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -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/dart/dart_action.gni")
|
import("../build/dart/dart_action.gni")
|
||||||
import("../runtime/runtime_args.gni")
|
|
||||||
import("../sdk_args.gni")
|
import("../sdk_args.gni")
|
||||||
|
|
||||||
_dart_root = get_path_info("..", "abspath")
|
_dart_root = get_path_info("..", "abspath")
|
||||||
|
|
|
@ -39,18 +39,21 @@ prebuilt_dart_action("bootstrap_gen_kernel") {
|
||||||
args = []
|
args = []
|
||||||
}
|
}
|
||||||
|
|
||||||
import("../aot_snapshot.gni")
|
import("../application_snapshot.gni")
|
||||||
|
|
||||||
aot_snapshot("gen_kernel") {
|
application_snapshot("gen_kernel") {
|
||||||
main_dart = "../../pkg/vm/bin/gen_kernel.dart"
|
main_dart = "../../pkg/vm/bin/gen_kernel.dart"
|
||||||
deps = [ "../../runtime/vm:vm_platform" ]
|
deps = [ "../../runtime/vm:vm_platform" ]
|
||||||
output = "$root_gen_dir/gen_kernel_aot.dart.snapshot"
|
|
||||||
|
|
||||||
# dartaotruntime has dart_product_config applied to it,
|
# NOTE: The output filename must be kept in sync with the output of the
|
||||||
# so it is built in # product mode in both release and
|
# vm_platform rule.
|
||||||
# product builds, and is only built in debug mode in debug
|
vm_platform_out =
|
||||||
# builds. The following line ensures that the dartaotruntime
|
get_label_info("../../runtime/vm:vm_platform", "root_out_dir")
|
||||||
# and gen_kernel_aot snapshot in an SDK build are
|
vm_platform = "$vm_platform_out/vm_platform_strong.dill"
|
||||||
# always compatible with each other.
|
training_args = [
|
||||||
force_product_mode = !dart_debug
|
"--platform",
|
||||||
|
rebase_path(vm_platform, root_build_dir),
|
||||||
|
rebase_path("../../pkg/vm/bin/gen_kernel.dart", root_build_dir),
|
||||||
|
"-o -",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue