From 1b331d05c250b9e0a1615826d177c5b719e9287d Mon Sep 17 00:00:00 2001 From: asiva Date: Tue, 5 Nov 2024 20:39:15 +0000 Subject: [PATCH] [SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensures we have a uniform name for the executable between the build directories and the SDK directory TEST=ci Change-Id: I96ed52994e0d955300c18026032e68003504666d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389760 Reviewed-by: Ryan Macnak Commit-Queue: Siva Annamalai Reviewed-by: Alexander Thomas --- BUILD.gn | 28 +++++++++-- .../NativeCall/native/native_functions.c | 2 +- docs/Kernel-developer-notes.md | 2 +- pkg/dart2wasm/tool/compile_benchmark | 2 +- pkg/dartdev/lib/src/sdk.dart | 4 +- pkg/dev_compiler/test/worker/worker_test.dart | 12 +++-- pkg/dynamic_modules/test/runner/util.dart | 5 +- .../src/linux_and_intel_specific_perf.dart | 2 +- pkg/smith/lib/configuration.dart | 2 +- .../lib/src/build_configurations.dart | 2 +- .../lib/src/compiler_configuration.dart | 2 +- pkg/test_runner/lib/src/process_queue.dart | 10 ++-- .../lib/src/runtime_configuration.dart | 6 +-- pkg/vm/tool/dart_precompiled_runtime2 | 2 +- runtime/BUILD.gn | 2 +- runtime/bin/BUILD.gn | 32 ++++++++----- ....cml => dartaotruntime_test_component.cml} | 2 +- runtime/bin/entrypoints_verification_test.cc | 10 ++-- .../ffi_test/ffi_test_functions_vmspecific.cc | 2 +- runtime/configs.gni | 26 +++++----- runtime/docs/aot_binary_size_analysis.md | 4 +- runtime/docs/contributing_to_dart_ffi.md | 6 +-- runtime/docs/dwarf_stack_traces.md | 10 ++-- runtime/docs/infra/il_tests.md | 2 +- runtime/runtime_args.gni | 2 +- .../concurrency/run_stress_test_shards.dart | 4 +- .../vm/dart/sanitizer_compatibility_test.dart | 5 +- .../tests/vm/dart/use_flag_test_helper.dart | 4 +- runtime/tools/dartfuzz/flag_fuzzer.dart | 2 +- ...led_runtime.plist => dartaotruntime.plist} | 0 ...uct.plist => dartaotruntime_product.plist} | 0 runtime/tools/profiling/README.md | 4 +- runtime/vm/BUILD.gn | 4 +- sdk/BUILD.gn | 47 ++++++++++++------- tests/ffi/native_assets/helpers.dart | 2 +- tests/standalone/io/platform_test.dart | 2 +- .../package/package_isolate_test.dart | 3 +- tools/bots/test_matrix.json | 36 +++++++------- tools/bots/try_benchmarks.sh | 6 +-- tools/gn.py | 4 +- tools/run_offsets_extractor.dart | 4 +- tools/task_kill.py | 4 -- utils/bazel/BUILD.gn | 8 +++- utils/compiler/BUILD.gn | 16 +++++-- utils/ddc/BUILD.gn | 8 +++- utils/kernel-service/BUILD.gn | 17 +++++-- 46 files changed, 209 insertions(+), 150 deletions(-) rename runtime/bin/{dart_precompiled_runtime_test_component.cml => dartaotruntime_test_component.cml} (89%) rename runtime/tools/entitlements/{dart_precompiled_runtime.plist => dartaotruntime.plist} (100%) rename runtime/tools/entitlements/{dart_precompiled_runtime_product.plist => dartaotruntime_product.plist} (100%) diff --git a/BUILD.gn b/BUILD.gn index d64929636f6..1fe522690e7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -86,7 +86,7 @@ group("run_ffi_unit_tests") { group("runtime_precompiled") { import("runtime/runtime_args.gni") deps = [ - "runtime/bin:dart_precompiled_runtime", + "runtime/bin:dartaotruntime", "runtime/bin:gen_snapshot", "runtime/bin:gen_snapshot($host_toolchain)", "runtime/bin:process_test", @@ -110,7 +110,15 @@ group("create_platform_sdk") { } group("dart2js") { - deps = [ "utils/compiler:dart2js" ] + import("runtime/runtime_args.gni") + if (dart_target_arch != "ia32" && dart_target_arch != "x86") { + deps = [ + ":runtime_precompiled", + "utils/compiler:dart2js_sdk_aot", + ] + } else { + deps = [ "utils/compiler:dart2js" ] + } } group("dart2wasm_platform") { @@ -148,7 +156,19 @@ group("dartanalyzer") { } group("ddc") { - deps = [ "utils/ddc:dartdevc" ] + import("runtime/runtime_args.gni") + if (dart_target_arch != "ia32" && dart_target_arch != "x86") { + deps = [ + ":runtime_precompiled", + "utils/bazel:kernel_worker_aot", + "utils/ddc:dartdevc_aot", + ] + } else { + deps = [ + "utils/bazel:kernel_worker", + "utils/ddc:dartdevc", + ] + } } group("analysis_server") { @@ -367,7 +387,7 @@ if (is_fuchsia) { test_binaries = [ "dart", - "dart_precompiled_runtime", + "dartaotruntime", "run_vm_tests", ] diff --git a/benchmarks/NativeCall/native/native_functions.c b/benchmarks/NativeCall/native/native_functions.c index c19251d7775..47ec45790b5 100644 --- a/benchmarks/NativeCall/native/native_functions.c +++ b/benchmarks/NativeCall/native/native_functions.c @@ -7,7 +7,7 @@ #include // TODO(dartbug.com/40579): This requires static linking to either link -// dart.exe or dart_precompiled_runtime.exe on Windows. +// dart.exe or dartaotruntime.exe on Windows. // The sample currently fails on Windows in AOT mode. #include "include/dart_api.h" diff --git a/docs/Kernel-developer-notes.md b/docs/Kernel-developer-notes.md index 8e7608c518c..fd7fe553cb7 100644 --- a/docs/Kernel-developer-notes.md +++ b/docs/Kernel-developer-notes.md @@ -28,7 +28,7 @@ Run end-to-end tests using dartk + VM: Optionally (this is slow) run end-to-end tests using AOT: ``` -./tools/build.py dart_precompiled_runtime +./tools/build.py runtime_precompiled ./tools/test.py -cdartkp -rdart_precompiled language co19 ``` diff --git a/pkg/dart2wasm/tool/compile_benchmark b/pkg/dart2wasm/tool/compile_benchmark index eefae07e31f..495fd45d635 100755 --- a/pkg/dart2wasm/tool/compile_benchmark +++ b/pkg/dart2wasm/tool/compile_benchmark @@ -35,7 +35,7 @@ BIN_DIR="$OUT_DIR/$DART_CONFIGURATION" BINARYEN="$BIN_DIR/wasm-opt" DART="$BIN_DIR/dart" -DART_AOT_RUNTIME="$BIN_DIR/dart_precompiled_runtime" +DART_AOT_RUNTIME="$BIN_DIR/dartaotruntime" LIBRARIES_JSON_ARG="--libraries-spec=$SDK_DIR/sdk/lib/libraries.json" function find_flags { diff --git a/pkg/dartdev/lib/src/sdk.dart b/pkg/dartdev/lib/src/sdk.dart index c91c60fedac..97d6d6e2318 100644 --- a/pkg/dartdev/lib/src/sdk.dart +++ b/pkg/dartdev/lib/src/sdk.dart @@ -54,8 +54,8 @@ class Sdk { ? path.absolute( sdkPath, Platform.isWindows - ? 'dart_precompiled_runtime_product.exe' - : 'dart_precompiled_runtime_product', + ? 'dartaotruntime_product.exe' + : 'dartaotruntime_product', ) : path.absolute( sdkPath, diff --git a/pkg/dev_compiler/test/worker/worker_test.dart b/pkg/dev_compiler/test/worker/worker_test.dart index bf18fe92868..b2d2ad3d40b 100644 --- a/pkg/dev_compiler/test/worker/worker_test.dart +++ b/pkg/dev_compiler/test/worker/worker_test.dart @@ -25,17 +25,19 @@ void main() { var dartAotRuntime = p.absolute( sdkPath, Platform.isWindows - ? 'dart_precompiled_runtime_product.exe' - : 'dart_precompiled_runtime_product'); + ? 'dartaotruntime_product.exe' + : 'dartaotruntime_product'); + var snapshotName = _resolvePath('gen/dartdevc_aot_product.dart.snapshot'); if (!File(dartAotRuntime).existsSync()) { dartAotRuntime = p.absolute( sdkPath, Platform.isWindows - ? 'dart_precompiled_runtime.exe' - : 'dart_precompiled_runtime'); + ? 'dartaotruntime_product.exe' + : 'dartaotruntime_product'); + snapshotName = _resolvePath('gen/dartdevc_aot.dart.snapshot'); } final executableArgs = [ - _resolvePath('gen/dartdevc_aot.dart.snapshot'), + snapshotName, '--sound-null-safety', '--dart-sdk-summary', _resolvePath('ddc_outline.dill'), diff --git a/pkg/dynamic_modules/test/runner/util.dart b/pkg/dynamic_modules/test/runner/util.dart index b721b8605aa..58d35675431 100644 --- a/pkg/dynamic_modules/test/runner/util.dart +++ b/pkg/dynamic_modules/test/runner/util.dart @@ -86,9 +86,8 @@ Uri genSnapshotBin = buildRootUri.resolve(useProduct ? 'gen_snapshot_product' : 'gen_snapshot'); Uri dart2bytecodeSnapshot = buildRootUri.resolve('gen/dart2bytecode.dart.snapshot'); -Uri aotRuntimeBin = buildRootUri.resolve(useProduct - ? 'dart_precompiled_runtime_product' - : 'dart_precompiled_runtime'); +Uri aotRuntimeBin = buildRootUri + .resolve(useProduct ? 'dartaotruntime_product' : 'dartaotruntime'); Uri vmPlatformDill = buildRootUri.resolve('vm_platform_strong.dill'); // Encodes test results in the format expected by Dart's CI infrastructure. diff --git a/pkg/front_end/lib/src/linux_and_intel_specific_perf.dart b/pkg/front_end/lib/src/linux_and_intel_specific_perf.dart index 8a1614dbfaf..df57406ade4 100644 --- a/pkg/front_end/lib/src/linux_and_intel_specific_perf.dart +++ b/pkg/front_end/lib/src/linux_and_intel_specific_perf.dart @@ -41,7 +41,7 @@ int _perfPid = -1; /// You might also want the dartaotruntime to include debug symbols: /// /// ``` -/// cp out/ReleaseX64/dart_precompiled_runtime_product \ +/// cp out/ReleaseX64/dartaotruntime_product \ /// out/ReleaseX64/dart-sdk/bin/dartaotruntime /// ``` /// diff --git a/pkg/smith/lib/configuration.dart b/pkg/smith/lib/configuration.dart index 04bdeb308ce..c1761e582c2 100644 --- a/pkg/smith/lib/configuration.dart +++ b/pkg/smith/lib/configuration.dart @@ -251,7 +251,7 @@ class Configuration { .pathSegments .lastWhere((e) => e.isNotEmpty); final executableNoExtension = executableName.split('.').first; - if (executableNoExtension == 'dart_precompiled_runtime') { + if (executableNoExtension == 'dartaotruntime') { runtime = Runtime.dartPrecompiled; } else if (executableNoExtension == 'dart') { runtime = Runtime.vm; diff --git a/pkg/test_runner/lib/src/build_configurations.dart b/pkg/test_runner/lib/src/build_configurations.dart index 63bc6446039..ffb51d08a37 100644 --- a/pkg/test_runner/lib/src/build_configurations.dart +++ b/pkg/test_runner/lib/src/build_configurations.dart @@ -80,7 +80,7 @@ List _selectBuildTargets(Configuration inner) { final compiler = inner.compiler; const targetsForCompilers = { Compiler.dartk: ['runtime'], - Compiler.dartkp: ['runtime', 'dart_precompiled_runtime'], + Compiler.dartkp: ['runtime', 'runtime_precompiled'], Compiler.appJitk: ['runtime'], Compiler.fasta: ['create_sdk', 'ddc_stable_test', 'kernel_platform_files'], Compiler.ddc: ['ddc_stable_test'], diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart index 67bc57669be..07aaceda9eb 100644 --- a/pkg/test_runner/lib/src/compiler_configuration.dart +++ b/pkg/test_runner/lib/src/compiler_configuration.dart @@ -1601,7 +1601,7 @@ class BytecodeCompilerConfiguration extends CompilerConfiguration { String dartAotRuntime() => _useSdk ? '${_configuration.buildDirectory}/dart-sdk/bin/dartaotruntime' - : '${_configuration.buildDirectory}/dart_precompiled_runtime'; + : '${_configuration.buildDirectory}/dartaotruntime'; String dart2bytecodeSnapshot() => _useSdk ? '${_configuration.buildDirectory}/dart-sdk/bin/snapshots/dart2bytecode.dart.snapshot' diff --git a/pkg/test_runner/lib/src/process_queue.dart b/pkg/test_runner/lib/src/process_queue.dart index 630e62c51a2..39e8ef7f2d0 100644 --- a/pkg/test_runner/lib/src/process_queue.dart +++ b/pkg/test_runner/lib/src/process_queue.dart @@ -646,11 +646,9 @@ class CommandExecutorImpl implements CommandExecutor { steps.add(() => device.runAdbShellCommand(['rm', '-Rf', deviceTestDir])); steps.add(() => device.runAdbShellCommand(['mkdir', '-p', deviceTestDir])); steps.add(() => device.pushCachedData( - '$buildPath/exe.stripped/dart_precompiled_runtime', - '$devicedir/dart_precompiled_runtime')); + '$buildPath/exe.stripped/dartaotruntime', '$devicedir/dartaotruntime')); steps.add(() => device.pushCachedData( - '$buildPath/dart_precompiled_runtime.sym', - '$devicedir/dart_precompiled_runtime.sym')); + '$buildPath/dartaotruntime.sym', '$devicedir/dartaotruntime.sym')); steps.add( () => device.pushCachedData(processTest, '$devicedir/process_test')); steps.add(() => device.pushCachedData( @@ -658,7 +656,7 @@ class CommandExecutorImpl implements CommandExecutor { steps.add(() => device.runAdbShellCommand([ 'chmod', '777', - '$devicedir/dart_precompiled_runtime $devicedir/process_test $devicedir/abstract_socket_test' + '$devicedir/dartaotruntime $devicedir/process_test $devicedir/abstract_socket_test' ])); steps.addAll(_pushLibraries(command, device, devicedir, deviceTestDir)); @@ -671,7 +669,7 @@ class CommandExecutorImpl implements CommandExecutor { steps.add(() => device.runAdbShellCommand([ 'export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$deviceTestDir;' 'export TEST_COMPILATION_DIR=$deviceTestDir;' - '$devicedir/dart_precompiled_runtime', + '$devicedir/dartaotruntime', '--android-log-to-stderr', ...arguments, ], timeout: timeoutDuration)); diff --git a/pkg/test_runner/lib/src/runtime_configuration.dart b/pkg/test_runner/lib/src/runtime_configuration.dart index a5b9a81a2ff..3f277af4dbe 100644 --- a/pkg/test_runner/lib/src/runtime_configuration.dart +++ b/pkg/test_runner/lib/src/runtime_configuration.dart @@ -118,7 +118,7 @@ abstract class RuntimeConfiguration { // cannot. dir = dir.replaceAll("SIMARM_X64", "SIMARM"); - dartExecutable = '$dir/dart_precompiled_runtime$executableExtension'; + dartExecutable = '$dir/dartaotruntime$executableExtension'; } TestUtils.ensureExists(dartExecutable, _configuration); @@ -431,7 +431,7 @@ class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration { if (script != null && type != 'application/dart-precompiled' && type != 'application/dart-bytecode') { - throw "dart_precompiled cannot run files of type '$type'."; + throw "dartaotruntime cannot run files of type '$type'."; } var executable = dartPrecompiledBinaryFileName; @@ -496,7 +496,7 @@ class DartPrecompiledAdbRuntimeConfiguration var script = artifact?.filename; var type = artifact?.mimeType; if (script != null && type != 'application/dart-precompiled') { - throw "dart_precompiled cannot run files of type '$type'."; + throw "dartaotruntime cannot run files of type '$type'."; } var processTest = processTestBinaryFileName; diff --git a/pkg/vm/tool/dart_precompiled_runtime2 b/pkg/vm/tool/dart_precompiled_runtime2 index 3d76580eadf..f5d111283d8 100755 --- a/pkg/vm/tool/dart_precompiled_runtime2 +++ b/pkg/vm/tool/dart_precompiled_runtime2 @@ -33,4 +33,4 @@ fi export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64} BIN_DIR="$OUT_DIR$DART_CONFIGURATION" -exec "$BIN_DIR"/dart_precompiled_runtime "$@" +exec "$BIN_DIR"/dartaotruntime "$@" diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 4ee557c1a78..b29afaf07d0 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -51,7 +51,7 @@ config("dart_product_config") { } } -config("dart_precompiled_runtime_config") { +config("dart_aotruntime_config") { defines = [] defines += [ "DART_PRECOMPILED_RUNTIME", diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index c06e6194529..e1832421c59 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -903,15 +903,21 @@ dart_executable("dart") { } } -dart_executable("dart_precompiled_runtime") { +# This rule is here to ensure benchmark suites do not break, it can be +# removed once the benchmark suites are updated. +group("dart_precompiled_runtime") { + deps = [ ":dartaotruntime" ] +} + +dart_executable("dartaotruntime") { extra_configs = [ - "..:dart_precompiled_runtime_config", + "..:dart_aotruntime_config", "..:add_empty_macho_section_config", ] extra_deps = [ ":icudtl_cc", - "..:libdart_precompiled_runtime", - "../platform:libdart_platform_precompiled_runtime", + "..:libdart_aotruntime", + "../platform:libdart_platform_aotruntime", ] if (dart_runtime_mode != "release") { extra_deps += [ "../observatory:standalone_observatory_archive" ] @@ -944,15 +950,15 @@ dart_executable("dart_precompiled_runtime") { } } -dart_executable("dart_precompiled_runtime_product") { +dart_executable("dartaotruntime_product") { use_product_mode = true extra_configs = [ - "..:dart_precompiled_runtime_config", + "..:dart_aotruntime_config", "..:add_empty_macho_section_config", ] extra_deps = [ - "..:libdart_precompiled_runtime_product", - "../platform:libdart_platform_precompiled_runtime_product", + "..:libdart_aotruntime_product", + "../platform:libdart_platform_aotruntime_product", ] extra_sources = [ "builtin.cc", @@ -978,17 +984,17 @@ dart_executable("dart_precompiled_runtime_product") { if (build_analyze_snapshot) { dart_executable("analyze_snapshot") { use_product_mode = dart_runtime_mode == "release" - extra_configs = [ "..:dart_precompiled_runtime_config" ] + extra_configs = [ "..:dart_aotruntime_config" ] if (use_product_mode) { extra_deps = [ - "..:libdart_precompiled_runtime_product", - "../platform:libdart_platform_precompiled_runtime_product", + "..:libdart_aotruntime_product", + "../platform:libdart_platform_aotruntime_product", ] } else { extra_deps = [ - "..:libdart_precompiled_runtime", - "../platform:libdart_platform_precompiled_runtime", + "..:libdart_aotruntime", + "../platform:libdart_platform_aotruntime", ] } diff --git a/runtime/bin/dart_precompiled_runtime_test_component.cml b/runtime/bin/dartaotruntime_test_component.cml similarity index 89% rename from runtime/bin/dart_precompiled_runtime_test_component.cml rename to runtime/bin/dartaotruntime_test_component.cml index dc2db52525f..a43e088847d 100644 --- a/runtime/bin/dart_precompiled_runtime_test_component.cml +++ b/runtime/bin/dartaotruntime_test_component.cml @@ -7,7 +7,7 @@ "//runtime/vm.shard.cml", ], program: { - binary: "exe.stripped/dart_precompiled_runtime", + binary: "exe.stripped/dartaotruntime", runner: "elf_test_runner", }, capabilities: [ diff --git a/runtime/bin/entrypoints_verification_test.cc b/runtime/bin/entrypoints_verification_test.cc index 869dfd6616b..806f3e31f77 100644 --- a/runtime/bin/entrypoints_verification_test.cc +++ b/runtime/bin/entrypoints_verification_test.cc @@ -7,7 +7,7 @@ #include // TODO(dartbug.com/40579): This requires static linking to either link -// dart.exe or dart_precompiled_runtime.exe on Windows. +// dart.exe or dartaotruntime.exe on Windows. // The sample currently fails on Windows in AOT mode. #include "include/dart_api.h" #include "include/dart_native_api.h" @@ -29,12 +29,12 @@ abort(); \ } -static bool is_dart_precompiled_runtime = true; +static bool is_dartaotruntime = true; // Some invalid accesses are allowed in AOT since we don't retain @pragma // annotations. Therefore we skip the negative tests in AOT. #define FAIL(name, result) \ - if (!is_dart_precompiled_runtime) { \ + if (!is_dartaotruntime) { \ Fail(name, result); \ } @@ -46,7 +46,7 @@ void Fail(const char* name, Dart_Handle result) { } #define FAIL_INVOKE_FIELD(name, result) \ - if (!is_dart_precompiled_runtime) { \ + if (!is_dartaotruntime) { \ FailInvokeField(name, result); \ } @@ -94,7 +94,7 @@ static void TestFields(Dart_Handle target) { } DART_EXPORT void RunTests() { - is_dart_precompiled_runtime = Dart_IsPrecompiledRuntime(); + is_dartaotruntime = Dart_IsPrecompiledRuntime(); Dart_Handle lib = Dart_RootLibrary(); diff --git a/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc b/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc index f50c7f4c3e0..351005d6676 100644 --- a/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc +++ b/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc @@ -34,7 +34,7 @@ #include // TODO(dartbug.com/40579): This requires static linking to either link -// dart.exe or dart_precompiled_runtime.exe on Windows. +// dart.exe or dartaotruntime.exe on Windows. // The sample currently fails on Windows in AOT mode. #include "include/dart_api.h" #include "include/dart_native_api.h" diff --git a/runtime/configs.gni b/runtime/configs.gni index f2306b7fb33..c8ef6312734 100644 --- a/runtime/configs.gni +++ b/runtime/configs.gni @@ -32,17 +32,15 @@ _base_libfuzzer_config = [ "$_dart_runtime:dart_libfuzzer_config" ] _libfuzzer_config = _base_config + _base_libfuzzer_config -_precompiled_runtime_config = - _base_config + [ - "$_dart_runtime:dart_maybe_product_config", - "$_dart_runtime:dart_precompiled_runtime_config", - ] +_aotruntime_config = _base_config + [ + "$_dart_runtime:dart_maybe_product_config", + "$_dart_runtime:dart_aotruntime_config", + ] -_precompiled_runtime_product_config = - _base_config + [ - "$_dart_runtime:dart_precompiled_runtime_config", - "$_dart_runtime:dart_product_config", - ] +_aotruntime_product_config = _base_config + [ + "$_dart_runtime:dart_aotruntime_config", + "$_dart_runtime:dart_product_config", + ] _precompiler_base = [ "$_dart_runtime:dart_precompiler_config" ] @@ -81,15 +79,15 @@ _all_configs = [ is_product = true }, { - suffix = "_precompiled_runtime" - configs = _precompiled_runtime_config + suffix = "_aotruntime" + configs = _aotruntime_config snapshot = true compiler = false is_product = false }, { - suffix = "_precompiled_runtime_product" - configs = _precompiled_runtime_product_config + suffix = "_aotruntime_product" + configs = _aotruntime_product_config snapshot = true compiler = false is_product = true diff --git a/runtime/docs/aot_binary_size_analysis.md b/runtime/docs/aot_binary_size_analysis.md index 50d82beca86..62cd08526ef 100644 --- a/runtime/docs/aot_binary_size_analysis.md +++ b/runtime/docs/aot_binary_size_analysis.md @@ -13,7 +13,7 @@ This flag can be passed to `gen_snapshot` directly, or to the various wrapper scripts (e.g. `pkg/vm/tool/precompiler2`): ``` -% tools/build.py -mrelease -ax64 runtime dart_precompiled_runtime +% tools/build.py -mrelease -ax64 runtime runtime_precompiled % pkg/vm/tool/precompiler2 --print-instructions-sizes-to=hello_sizes.json hello.dart hello.dart.aot ``` @@ -59,7 +59,7 @@ This flag can be passed to `gen_snapshot` directly, or to the various wrapper scripts (e.g. `pkg/vm/tool/precompiler2`): ``` -% tools/build.py -mrelease -ax64 runtime dart_precompiled_runtime +% tools/build.py -mrelease -ax64 runtime runtime_precompiled % pkg/vm/tool/precompiler2 --write-v8-snapshot-profile-to=hello.heapsnapshot hello.dart hello.dart.aot ``` diff --git a/runtime/docs/contributing_to_dart_ffi.md b/runtime/docs/contributing_to_dart_ffi.md index 3fbc0d84da5..9128c8a319a 100644 --- a/runtime/docs/contributing_to_dart_ffi.md +++ b/runtime/docs/contributing_to_dart_ffi.md @@ -218,7 +218,7 @@ Unit tests Integration tests -- `tests/ffi/(.*)_test.dart` Integration tests. Run for AOT on host machine with `$ tools/build.py -mdebug create_platform_sdk runtime ffi_test_functions dart_precompiled_runtime && tools/test.py -mdebug -cdartkp ffi`. Run for JIT on host machine with `$ tools/build.py -mdebug create_platform_sdk runtime ffi_test_functions && tools/test.py -mdebug ffi`. +- `tests/ffi/(.*)_test.dart` Integration tests. Run for AOT on host machine with `$ tools/build.py -mdebug create_platform_sdk runtime ffi_test_functions runtime_precompiled && tools/test.py -mdebug -cdartkp ffi`. Run for JIT on host machine with `$ tools/build.py -mdebug create_platform_sdk runtime ffi_test_functions && tools/test.py -mdebug ffi`. Test generators @@ -280,10 +280,10 @@ For Linux, use out/DebugX64 as the out directory and gdb as MIMode. }, }, { - "name": "ccpdbg dart_precompiled_runtime", + "name": "ccpdbg dartaotruntime", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/xcodebuild/DebugARM64/dart_precompiled_runtime", + "program": "${workspaceFolder}/xcodebuild/DebugARM64/dartaotruntime", "args": [ "/Users/dacoharkes/dart-sdk/sdk/xcodebuild/DebugARM64/generated_compilations/custom-configuration-4/runtime_tests_vm_dart_memoizable_idempotent_test/out.aotsnapshot", ], diff --git a/runtime/docs/dwarf_stack_traces.md b/runtime/docs/dwarf_stack_traces.md index 41cf124651c..f57fa13ba73 100644 --- a/runtime/docs/dwarf_stack_traces.md +++ b/runtime/docs/dwarf_stack_traces.md @@ -56,7 +56,7 @@ $ out/ReleaseX64/gen_snapshot --snapshot_kind=app-aot-elf --elf=snapshot.so thro # as including it in the generated ELF snapshot for future examples. $ out/ReleaseX64/gen_snapshot --dwarf-stack-traces --save-debugging-info=debug.data --snapshot_kind=app-aot-elf --elf=dwarf_snapshot.so throws.dill -$ out/ReleaseX64/dart_precompiled_runtime snapshot.so +$ out/ReleaseX64/dartaotruntime snapshot.so Unhandled exception: Throw of null. #0 bar (file:///.../sdk/throws.dart:2) @@ -65,7 +65,7 @@ Throw of null. #3 _startIsolate. (dart:isolate-patch/isolate_patch.dart:307) #4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:174) -$ out/ReleaseX64/dart_precompiled_runtime dwarf_snapshot.so +$ out/ReleaseX64/dartaotruntime dwarf_snapshot.so Unhandled exception: Throw of null. Warning: This VM has been configured to produce stack traces that violate the Dart standard. @@ -147,7 +147,7 @@ stack traces as follows: ```bash # Using the unstripped ELF snapshot and piping all output to the tool's stdin. -$ out/ReleaseX64/dart_precompiled_runtime dwarf_snapshot.so |& out/ReleaseX64/dart pkg/native_stack_traces/bin/decode.dart -e dwarf_snapshot.so +$ out/ReleaseX64/dartaotruntime dwarf_snapshot.so |& out/ReleaseX64/dart pkg/native_stack_traces/bin/decode.dart -e dwarf_snapshot.so Unhandled exception: Throw of null. Warning: This VM has been configured to produce stack traces that violate the Dart standard. @@ -161,7 +161,7 @@ isolate_instructions: 7fc7ad076000 vm_instructions: 0 #4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:174) # Using the separately saved debugging information and piping all output to the tool's stdin. -$ out/ReleaseX64/dart_precompiled_runtime dwarf_snapshot.so |& out/ReleaseX64/dart pkg/native_stack_traces/bin/decode.dart -e debug.data +$ out/ReleaseX64/dartaotruntime dwarf_snapshot.so |& out/ReleaseX64/dart pkg/native_stack_traces/bin/decode.dart -e debug.data Unhandled exception: Throw of null. Warning: This VM has been configured to produce stack traces that violate the Dart standard. @@ -175,7 +175,7 @@ isolate_instructions: 7f0df76e1000 vm_instructions: 0 #4 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:174) # Saving all output to the file "output.txt". -$ out/ReleaseX64/dart_precompiled_runtime dwarf_snapshot.so >output.txt 2>&1 +$ out/ReleaseX64/dartaotruntime dwarf_snapshot.so >output.txt 2>&1 # Reading the input to convert from the file "output.txt" instead of stdin. $ out/ReleaseX64/dart pkg/native_stack_traces/bin/decode.dart -e debug.data -i output.txt diff --git a/runtime/docs/infra/il_tests.md b/runtime/docs/infra/il_tests.md index 44b948c5ac5..70aa32130b8 100644 --- a/runtime/docs/infra/il_tests.md +++ b/runtime/docs/infra/il_tests.md @@ -19,7 +19,7 @@ $ tools/test.py -n dartkp-linux-release-x64 $path_to_an_il_test $ tools/test.py -c dartkp -m release $path_to_an_il_test ``` -Tests require `gen_snapshot`, `dart_precompiled_runtime` and +Tests require `gen_snapshot`, `dartaotruntime` and `vm_platform_strong.dill` to be built for the target configuration. Each IL test should contain one or more of the functions marked with a diff --git a/runtime/runtime_args.gni b/runtime/runtime_args.gni index e9adc042cc0..fbcfeb157fb 100644 --- a/runtime/runtime_args.gni +++ b/runtime/runtime_args.gni @@ -23,7 +23,7 @@ declare_args() { # # TODO(rmacnak): dart_runtime_mode no longer selects whether libdart is build # for JIT or AOT, since libdart waw split into libdart_jit and - # libdart_precompiled_runtime. We should remove this flag and just set + # libdart_aotruntime. We should remove this flag and just set # dart_debug/dart_product. dart_runtime_mode = "develop" diff --git a/runtime/tests/concurrency/run_stress_test_shards.dart b/runtime/tests/concurrency/run_stress_test_shards.dart index d1af05666b3..232945b0ec9 100644 --- a/runtime/tests/concurrency/run_stress_test_shards.dart +++ b/runtime/tests/concurrency/run_stress_test_shards.dart @@ -85,8 +85,8 @@ class AotTestRunner extends TestRunner { '$buildDir/gen_snapshot', ['--snapshot-kind=app-aot-elf', '--elf=$elfFile', ...arguments], crashes)) { - await run('$buildDir/dart_precompiled_runtime', - [...aotArguments, elfFile], crashes); + await run( + '$buildDir/dartaotruntime', [...aotArguments, elfFile], crashes); } }); } diff --git a/runtime/tests/vm/dart/sanitizer_compatibility_test.dart b/runtime/tests/vm/dart/sanitizer_compatibility_test.dart index fe804931a20..4ba965f17c1 100644 --- a/runtime/tests/vm/dart/sanitizer_compatibility_test.dart +++ b/runtime/tests/vm/dart/sanitizer_compatibility_test.dart @@ -39,10 +39,9 @@ main() async { var nonePlatform = "$out/$mode$arch/vm_platform_strong.dill"; var noneGenSnapshot = "$out/$mode$arch/gen_snapshot"; var noneJitRuntime = "$out/$mode$arch/dart"; - var noneAotRuntime = "$out/$mode$arch/dart_precompiled_runtime"; + var noneAotRuntime = "$out/$mode$arch/dartaotruntime"; var sanitizerGenSnapshot = "$out/$mode$sanitizer$arch/gen_snapshot"; - var sanitizerAotRuntime = - "$out/$mode$sanitizer$arch/dart_precompiled_runtime"; + var sanitizerAotRuntime = "$out/$mode$sanitizer$arch/dartaotruntime"; checkExists(noneGenSnapshot); checkExists(noneJitRuntime); diff --git a/runtime/tests/vm/dart/use_flag_test_helper.dart b/runtime/tests/vm/dart/use_flag_test_helper.dart index 7789dc3369f..42767f79585 100644 --- a/runtime/tests/vm/dart/use_flag_test_helper.dart +++ b/runtime/tests/vm/dart/use_flag_test_helper.dart @@ -49,8 +49,8 @@ late final genSnapshot = () { throw 'Could not find gen_snapshot for build directory $buildDir'; }(); final dart = path.join(buildDir, 'dart' + (Platform.isWindows ? '.exe' : '')); -final dartPrecompiledRuntime = path.join( - buildDir, 'dart_precompiled_runtime' + (Platform.isWindows ? '.exe' : '')); +final dartPrecompiledRuntime = + path.join(buildDir, 'dartaotruntime' + (Platform.isWindows ? '.exe' : '')); final checkedInDartVM = path.join('tools', 'sdks', 'dart-sdk', 'bin', 'dart' + (Platform.isWindows ? '.exe' : '')); // Lazily initialize 'lipo' so that tests that don't use it on platforms diff --git a/runtime/tools/dartfuzz/flag_fuzzer.dart b/runtime/tools/dartfuzz/flag_fuzzer.dart index 3edea45e349..7708b7ed74c 100644 --- a/runtime/tools/dartfuzz/flag_fuzzer.dart +++ b/runtime/tools/dartfuzz/flag_fuzzer.dart @@ -183,7 +183,7 @@ test(int taskIndex) async { "out/dartfuzz/$taskIndex.dill", ], [ - "$buildDir/dart_precompiled_runtime", + "$buildDir/dartaotruntime", "--profiler", // Off by default unless VM service enabled ...someOf(profilerFlags), ...someOf(gcFlags), diff --git a/runtime/tools/entitlements/dart_precompiled_runtime.plist b/runtime/tools/entitlements/dartaotruntime.plist similarity index 100% rename from runtime/tools/entitlements/dart_precompiled_runtime.plist rename to runtime/tools/entitlements/dartaotruntime.plist diff --git a/runtime/tools/entitlements/dart_precompiled_runtime_product.plist b/runtime/tools/entitlements/dartaotruntime_product.plist similarity index 100% rename from runtime/tools/entitlements/dart_precompiled_runtime_product.plist rename to runtime/tools/entitlements/dartaotruntime_product.plist diff --git a/runtime/tools/profiling/README.md b/runtime/tools/profiling/README.md index 53a31e63cce..3d986dd403a 100644 --- a/runtime/tools/profiling/README.md +++ b/runtime/tools/profiling/README.md @@ -52,7 +52,7 @@ $ sudo $(which dart) runtime/tools/profiling/bin/set_uprobe.dart alloc Allocatio Record the profile: ``` -$ sudo perf record -g -e uprobes:alloc out/ReleaseX64/dart_precompiled_runtime test.aot +$ sudo perf record -g -e uprobes:alloc out/ReleaseX64/dartaotruntime test.aot $ sudo chmod 0755 perf.data ``` @@ -61,4 +61,4 @@ Produce a coalesced allocation profile from the recording: ``` $ dart runtime/tools/profiling/bin/convert_allocation_profile.dart perf.data $ pprof -flame pprof.profile -``` \ No newline at end of file +``` diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn index 2825acfe235..2212cc683ea 100644 --- a/runtime/vm/BUILD.gn +++ b/runtime/vm/BUILD.gn @@ -315,7 +315,7 @@ executable("offsets_extractor") { include_dirs = [ ".." ] } -executable("offsets_extractor_precompiled_runtime") { +executable("offsets_extractor_aotruntime") { # The timeline cannot be accessed from the generated executable, so we define # DART_DISABLE_TIMELINE to strip out the timeline source code. The precise # reason why we do this is to avoid missing header errors, as the Perfetto @@ -326,7 +326,7 @@ executable("offsets_extractor_precompiled_runtime") { configs += [ "..:dart_arch_config", "..:dart_config", - "..:dart_precompiled_runtime_config", + "..:dart_aotruntime_config", "..:dart_maybe_product_config", ":libdart_vm_config", ] diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 937593d5035..9122a88fc18 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -24,7 +24,7 @@ declare_args() { # Path to stripped dart binaries relative to build output directory. dart_stripped_binary = "dart" - dart_precompiled_runtime_stripped_binary = "dart_precompiled_runtime_product" + dart_aotruntime_stripped_binary = "dartaotruntime_product" gen_snapshot_stripped_binary = "gen_snapshot_product" analyze_snapshot_binary = "analyze_snapshot" wasm_opt_stripped_binary = "wasm-opt" @@ -116,41 +116,49 @@ _platform_sdk_snapshots = [ [ "analysis_server", "../utils/analysis_server", + "analysis_server", ], [ "dartdev", "../utils/dartdev:dartdev", + "dartdev", ], [ "dart_tooling_daemon", "../utils/dtd:dtd", + "dart_tooling_daemon", ], [ "dds", "../utils/dds:dds", + "dds", ], ] if (dart_target_arch != "ia32" && dart_target_arch != "x86") { _platform_sdk_snapshots += [ [ + "frontend_server_aot_product", + "../utils/kernel-service:frontend_server_aot_product", "frontend_server_aot", - "../utils/kernel-service:frontend_server_aot", ] ] } else { _platform_sdk_snapshots += [ [ "frontend_server", "../utils/kernel-service:frontend_server", + "frontend_server", ] ] } if (dart_snapshot_kind == "app-jit") { _platform_sdk_snapshots += [ [ "kernel-service", "../utils/kernel-service:kernel-service_snapshot", + "kernel-service", ] ] } if (dart_dynamic_modules) { _platform_sdk_snapshots += [ [ "dart2bytecode", "../utils/dart2bytecode:dart2bytecode", + "dart2bytecode", ] ] } @@ -161,16 +169,19 @@ if (dart_target_arch != "ia32" && dart_target_arch != "x86") { _full_sdk_snapshots = _platform_sdk_snapshots + [ [ + "dart2js_aot_product", + "../utils/compiler:dart2js_sdk_aot_product", "dart2js_aot", - "../utils/compiler:dart2js_sdk_aot", ], [ + "dartdevc_aot_product", + "../utils/ddc:dartdevc_aot_product", "dartdevc_aot", - "../utils/ddc:dartdevc_aot", ], [ + "kernel_worker_aot_product", + "../utils/bazel:kernel_worker_aot_product", "kernel_worker_aot", - "../utils/bazel:kernel_worker_aot", ], # Remove these JIT snapshot in Dart SDK version 3.7 @@ -178,10 +189,12 @@ if (dart_target_arch != "ia32" && dart_target_arch != "x86") { [ "dartdevc", "../utils/ddc:dartdevc", + "dartdevc", ], [ "kernel_worker", "../utils/bazel:kernel_worker", + "kernel_worker", ], ] } else { @@ -189,14 +202,17 @@ if (dart_target_arch != "ia32" && dart_target_arch != "x86") { [ "dart2js", "../utils/compiler:dart2js", + "dart2js", ], [ "dartdevc", "../utils/ddc:dartdevc", + "dartdevc", ], [ "kernel_worker", "../utils/bazel:kernel_worker", + "kernel_worker", ], ] } @@ -340,14 +356,13 @@ if (target_os != current_os && target_os == "fuchsia") { } } -copy("copy_dartaotruntime") { +copy("copy_dart_aotruntime") { visibility = [ ":group_dart2native" ] - deps = [ "../runtime/bin:dart_precompiled_runtime_product" ] - src_dir = get_label_info("../runtime/bin:dart_precompiled_runtime_product", - "root_out_dir") - sources = [ - "$src_dir/${dart_precompiled_runtime_stripped_binary}${executable_suffix}", - ] + deps = [ "../runtime/bin:dartaotruntime_product" ] + src_dir = + get_label_info("../runtime/bin:dartaotruntime_product", "root_out_dir") + sources = + [ "$src_dir/${dart_aotruntime_stripped_binary}${executable_suffix}" ] outputs = [ "$root_out_dir/$dart_sdk_output/bin/dartaotruntime${executable_suffix}", ] @@ -398,7 +413,7 @@ copy("copy_gen_kernel_snapshot") { group("group_dart2native") { deps = [ - ":copy_dartaotruntime", + ":copy_dart_aotruntime", ":copy_gen_kernel_snapshot", ":copy_gen_snapshot", ":copy_vm_platform_strong_product", @@ -448,7 +463,7 @@ group("copy_full_sdk_scripts") { } } -# This loop generates "copy" targets that put AppJIT snapshots into +# This loop generates "copy" targets that put snapshots into # bin/snapshots foreach(snapshot, _full_sdk_snapshots) { root = root_gen_dir @@ -456,6 +471,7 @@ foreach(snapshot, _full_sdk_snapshots) { # The frontend_server is output to root_out_dir so that it doesn't conflict # with the flutter snapshot by the same name under root_gen_dir. if (snapshot[0] == "frontend_server" || + snapshot[0] == "frontend_server_aot_product" || snapshot[0] == "frontend_server_aot") { root = root_out_dir } @@ -466,8 +482,7 @@ foreach(snapshot, _full_sdk_snapshots) { ] deps = [ snapshot[1] ] sources = [ "$root/${snapshot[0]}.dart.snapshot" ] - outputs = - [ "$root_out_dir/$dart_sdk_output/bin/snapshots/{{source_file_part}}" ] + outputs = [ "$root_out_dir/$dart_sdk_output/bin/snapshots/${snapshot[2]}.dart.snapshot" ] } } diff --git a/tests/ffi/native_assets/helpers.dart b/tests/ffi/native_assets/helpers.dart index 51aa6b30bab..9e64afa5f95 100644 --- a/tests/ffi/native_assets/helpers.dart +++ b/tests/ffi/native_assets/helpers.dart @@ -56,7 +56,7 @@ final genSnapshotUri = final dartUri = buildUriAbsolute.resolve('dart$standaloneExtensionExe'); final dartPrecompiledRuntimeUri = - buildUriAbsolute.resolve('dart_precompiled_runtime$standaloneExtensionExe'); + buildUriAbsolute.resolve('dartaotruntime$standaloneExtensionExe'); final platformDillUri = buildUriAbsolute.resolve('vm_platform_strong.dill'); diff --git a/tests/standalone/io/platform_test.dart b/tests/standalone/io/platform_test.dart index ee838080403..7e4c6355359 100644 --- a/tests/standalone/io/platform_test.dart +++ b/tests/standalone/io/platform_test.dart @@ -11,7 +11,7 @@ import "package:expect/expect.dart"; final executableSuffix = Platform.isWindows ? '.exe' : ''; final jitExecutableName = 'dart$executableSuffix'; -final aotExecutableName = 'dart_precompiled_runtime$executableSuffix'; +final aotExecutableName = 'dartaotruntime$executableSuffix'; bool hasJitOrAotExecutableName(String executable) => executable.endsWith(jitExecutableName) || diff --git a/tests/standalone/package/package_isolate_test.dart b/tests/standalone/package/package_isolate_test.dart index 9ab5f793272..60db5d35ccf 100644 --- a/tests/standalone/package/package_isolate_test.dart +++ b/tests/standalone/package/package_isolate_test.dart @@ -30,8 +30,7 @@ ReceivePort expectResponse() { void main() { // No support for tests that attempt to Isolate.spawnUri() in AOT of some // script other than self. - if (path.basenameWithoutExtension(Platform.executable) == - "dart_precompiled_runtime") { + if (path.basenameWithoutExtension(Platform.executable) == "dartaotruntime") { return; } diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json index a76046f75b5..1b75c67df68 100644 --- a/tools/bots/test_matrix.json +++ b/tools/bots/test_matrix.json @@ -73,7 +73,7 @@ "dart2wasm_hostasserts": [ ".dart_tool/package_config.json", "out/ReleaseX64/dart", - "out/ReleaseX64/dart_precompiled_runtime", + "out/ReleaseX64/dartaotruntime", "out/ReleaseX64/dart2js_platform.dill", "out/ReleaseX64/dart2wasm.snapshot", "out/ReleaseX64/dart2wasm_asserts.snapshot", @@ -798,7 +798,7 @@ "script": "tools/build.py", "arguments": [ "runtime", - "dart_precompiled_runtime", + "dartaotruntime", "--os=android" ] }, @@ -874,7 +874,7 @@ "script": "tools/build.py", "arguments": [ "--use-qemu", - "dart_precompiled_runtime", + "dartaotruntime", "runtime" ] }, @@ -922,7 +922,7 @@ "script": "tools/build.py", "arguments": [ "--use-qemu", - "dart_precompiled_runtime", + "dartaotruntime", "runtime" ] }, @@ -1103,7 +1103,7 @@ "script": "tools/build.py", "arguments": [ "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -1135,7 +1135,7 @@ "script": "tools/build.py", "arguments": [ "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -1171,7 +1171,7 @@ "script": "tools/build.py", "arguments": [ "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -1236,7 +1236,7 @@ "arguments": [ "--codesigning-identity=-", "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -1263,7 +1263,7 @@ "arguments": [ "--codesigning-identity=-", "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -1287,7 +1287,7 @@ "script": "tools/build.py", "arguments": [ "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -1313,7 +1313,7 @@ "script": "tools/build.py", "arguments": [ "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -1809,7 +1809,7 @@ "script": "tools/build.py", "arguments": [ "--no-clang", - "dart_precompiled_runtime", + "dartaotruntime", "gen_snapshot", "runtime" ] @@ -3366,7 +3366,7 @@ "create_sdk", "runtime", "gen_snapshot", - "dart_precompiled_runtime", + "dartaotruntime", "dart2js_platform.dill", "dart2js_platform_unsound.dill", "kernel-service.dart.snapshot", @@ -3498,7 +3498,7 @@ "--mode=debug,release", "--arch=x64,x64c", "runtime", - "dart_precompiled_runtime", + "dartaotruntime", "dart2js_platform.dill" ] }, @@ -3509,7 +3509,7 @@ "--mode=debug,release", "--arch=simarm64,simarm64c", "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -3519,7 +3519,7 @@ "--mode=debug,release", "--arch=simriscv32,simriscv64", "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -3580,7 +3580,7 @@ "--mode=debug,release", "--arch=x64", "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { @@ -3591,7 +3591,7 @@ "--arch=x64", "--sanitizer=tsan", "runtime", - "dart_precompiled_runtime" + "dartaotruntime" ] }, { diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh index 03ce0446893..11c7f222ed4 100755 --- a/tools/bots/try_benchmarks.sh +++ b/tools/bots/try_benchmarks.sh @@ -181,7 +181,7 @@ EOF rm -rf tmp elif [ "$command" = linux-x64-build ]; then # NOTE: These are duplicated in tools/bots/test_matrix.json, keep in sync. - ./tools/build.py --mode=release --arch=x64 create_sdk runtime gen_snapshot dart_precompiled_runtime dart2js_platform.dill dart2js_platform_unsound.dill kernel-service.dart.snapshot ddc_stable_test ddc_canary_test dart2wasm_benchmark + ./tools/build.py --mode=release --arch=x64 create_sdk runtime gen_snapshot dartaotruntime dart2js_platform.dill dart2js_platform_unsound.dill kernel-service.dart.snapshot ddc_stable_test ddc_canary_test dart2wasm_benchmark elif [ "$command" = linux-x64-archive ]; then export GZIP=-1 strip -w \ @@ -259,7 +259,7 @@ EOF -K '_ZN4dart7Version14snapshot_hash_E' \ -K '_ZN4dart7Version4str_E' \ -K '_ZN4dart7Version7commit_E' \ - -K '_ZN4dart9Bootstrap*_paths_E' out/ReleaseX64/dart_precompiled_runtime + -K '_ZN4dart9Bootstrap*_paths_E' out/ReleaseX64/dartaotruntime tar -czf linux-x64.tar.gz \ --exclude .git \ --exclude .gitignore \ @@ -281,7 +281,7 @@ EOF out/ReleaseX64/run_vm_tests \ third_party/d8/linux/x64 \ third_party/firefox_jsshell/ \ - out/ReleaseX64/dart_precompiled_runtime \ + out/ReleaseX64/dartaotruntime \ out/ReleaseX64/gen/utils/ddc \ out/ReleaseX64/ddc_outline_unsound.dill \ out/ReleaseX64/ddc_outline.dill \ diff --git a/tools/gn.py b/tools/gn.py index 6c331155701..1a7c5cfb670 100755 --- a/tools/gn.py +++ b/tools/gn.py @@ -273,8 +273,8 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash, # We don't support stripping on Windows if host_os != 'win': gn_args['dart_stripped_binary'] = 'exe.stripped/dart' - gn_args['dart_precompiled_runtime_stripped_binary'] = ( - 'exe.stripped/dart_precompiled_runtime_product') + gn_args['dart_aotruntime_stripped_binary'] = ( + 'exe.stripped/dartaotruntime_product') gn_args['gen_snapshot_stripped_binary'] = ( 'exe.stripped/gen_snapshot_product') gn_args['analyze_snapshot_binary'] = ('exe.stripped/analyze_snapshot') diff --git a/tools/run_offsets_extractor.dart b/tools/run_offsets_extractor.dart index 39b00bdbb52..195015fe46f 100755 --- a/tools/run_offsets_extractor.dart +++ b/tools/run_offsets_extractor.dart @@ -31,7 +31,7 @@ void main(List args) async { '-m$mode', '--no-rbe', 'offsets_extractor', - 'offsets_extractor_precompiled_runtime' + 'offsets_extractor_aotruntime' ]); print('Building $buildDir - done'); }); @@ -41,7 +41,7 @@ void main(List args) async { return await run(['$buildDir/offsets_extractor']); }).then((lines) => lines.join('\n')), forAllConfigurationsMode((String buildDir, _, _) async { - return await run(['$buildDir/offsets_extractor_precompiled_runtime']); + return await run(['$buildDir/offsets_extractor_aotruntime']); }).then((lines) => lines.join('\n')), ).wait; diff --git a/tools/task_kill.py b/tools/task_kill.py index c645cc0bae8..9adebed6a36 100755 --- a/tools/task_kill.py +++ b/tools/task_kill.py @@ -26,7 +26,6 @@ EXECUTABLE_NAMES = { 'chrome': 'chrome.exe', 'dart': 'dart.exe', 'dartaotruntime': 'dartaotruntime.exe', - 'dart_precompiled_runtime': 'dart_precompiled_runtime.exe', 'firefox': 'firefox.exe', 'gen_snapshot': 'gen_snapshot.exe', 'git': 'git.exe', @@ -38,7 +37,6 @@ EXECUTABLE_NAMES = { 'chrome': 'chrome', 'dart': 'dart', 'dartaotruntime': 'dartaotruntime', - 'dart_precompiled_runtime': 'dart_precompiled_runtime', 'firefox': 'firefox', 'gen_snapshot': 'gen_snapshot', 'flutter_tester': 'flutter_tester', @@ -49,7 +47,6 @@ EXECUTABLE_NAMES = { 'chrome_helper': 'Chrome Helper', 'dart': 'dart', 'dartaotruntime': 'dartaotruntime', - 'dart_precompiled_runtime': 'dart_precompiled_runtime', 'firefox': 'firefox', 'gen_snapshot': 'gen_snapshot', 'git': 'git', @@ -261,7 +258,6 @@ def KillDart(): status = Kill("dart", dump_stacks=True) status += Kill("gen_snapshot", dump_stacks=True) status += Kill("dartaotruntime", dump_stacks=True) - status += Kill("dart_precompiled_runtime", dump_stacks=True) status += Kill("flutter_tester", dump_stacks=True) return status diff --git a/utils/bazel/BUILD.gn b/utils/bazel/BUILD.gn index 4e6526f290a..681495cf975 100644 --- a/utils/bazel/BUILD.gn +++ b/utils/bazel/BUILD.gn @@ -12,8 +12,14 @@ aot_snapshot("kernel_worker_aot") { main_dart = "kernel_worker.dart" name = "kernel_worker_aot" output = "$root_gen_dir/kernel_worker_aot.dart.snapshot" +} - # dartaotruntime has dart_product_config applied to it, +aot_snapshot("kernel_worker_aot_product") { + main_dart = "kernel_worker.dart" + name = "kernel_worker_aot_product" + output = "$root_gen_dir/kernel_worker_aot_product.dart.snapshot" + + # dartaotruntime in the dart SDK has dart_product_config applied to it, # so it is built in product mode in both release and # product builds, and is only built in debug mode in debug # builds. The following line ensures that the dartaotruntime diff --git a/utils/compiler/BUILD.gn b/utils/compiler/BUILD.gn index f76196af31d..0ff168a8778 100644 --- a/utils/compiler/BUILD.gn +++ b/utils/compiler/BUILD.gn @@ -93,12 +93,20 @@ aot_snapshot("dart2js_sdk_aot") { main_dart = "$target_gen_dir/dart2js.dart" name = "dart2js_aot.dart" output = "$root_gen_dir/dart2js_aot.dart.snapshot" +} - # dartaotruntime has dart_product_config applied to it, - # so it is built in # product mode in both release and - # product builds, and is only built in debug mode in debug +aot_snapshot("dart2js_sdk_aot_product") { + deps = [ ":dart2js_create_snapshot_entry" ] + + main_dart = "$target_gen_dir/dart2js.dart" + name = "dart2js_aot_product.dart" + output = "$root_gen_dir/dart2js_aot_product.dart.snapshot" + + # dartaotruntime in the dart sdk has dart_product_config applied to it, + # so it is built in product mode in both release and + # product sdks, and is built in debug mode in debug # builds. The following line ensures that the dartaotruntime - # and dartdevc_aot snapshot in an SDK build are + # and dart2js aot snapshot in an SDK build are # always compatible with each other. force_product_mode = !dart_debug } diff --git a/utils/ddc/BUILD.gn b/utils/ddc/BUILD.gn index 9c6f1473319..8e36224f6bb 100644 --- a/utils/ddc/BUILD.gn +++ b/utils/ddc/BUILD.gn @@ -22,8 +22,14 @@ aot_snapshot("dartdevc_aot") { main_dart = "../../pkg/dev_compiler/bin/dartdevc.dart" name = "dartdevc_aot" output = "$root_gen_dir/dartdevc_aot.dart.snapshot" +} - # dartaotruntime has dart_product_config applied to it, +aot_snapshot("dartdevc_aot_product") { + main_dart = "../../pkg/dev_compiler/bin/dartdevc.dart" + name = "dartdevc_aot_product" + output = "$root_gen_dir/dartdevc_aot_product.dart.snapshot" + + # dartaotruntime in the dart sdk has dart_product_config applied to it, # so it is built in product mode in both release and # product builds, and is only built in debug mode in debug # builds. The following line ensures that the dartaotruntime diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn index e11924b8b5b..d029ef27d3e 100644 --- a/utils/kernel-service/BUILD.gn +++ b/utils/kernel-service/BUILD.gn @@ -69,12 +69,19 @@ aot_snapshot("frontend_server_aot") { main_dart = "../../pkg/frontend_server/bin/frontend_server_starter.dart" name = "frontend_server_aot" output = "$root_out_dir/frontend_server_aot.dart.snapshot" +} - # dartaotruntime has dart_product_config applied to it, so it is built in - # product mode in both release and product builds, and is only built in debug - # mode in debug builds. The following line ensures that the dartaotruntime and - # frontend_server_aot snapshot in an SDK build are always compatible with - # each other. +aot_snapshot("frontend_server_aot_product") { + main_dart = "../../pkg/frontend_server/bin/frontend_server_starter.dart" + name = "frontend_server_aot_product" + output = "$root_out_dir/frontend_server_aot_product.dart.snapshot" + + # dartaotruntime in the dart sdk has dart_product_config applied to it, + # so it is built in product mode in both release and + # product sdks, and is built in debug mode in debug + # builds. The following line ensures that the dartaotruntime + # and frontend_server aot snapshot in an SDK build are + # always compatible with each other. force_product_mode = !dart_debug }