"[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"

Fixed golem breakage by temporarily copying dartaotruntime to dart_precompiled_runtime

This reverts commit 75e6a748f7.

TEST=ci

Original change's description:
> Revert "[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"
>
> This reverts commit 1b331d05c2.
>
> Reason for revert: golem builds are failing
>
> Original change's description:
> > [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: Id0f383eabb496c06c0acebc639c8e3b056ba82d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393781
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
asiva
2024-11-06 03:10:31 +00:00
committed by Commit Queue
parent 1d4c570dc5
commit f81a402aa1
46 changed files with 220 additions and 150 deletions
+24 -4
View File
@@ -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",
]
@@ -7,7 +7,7 @@
#include <string.h>
// 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"
+1 -1
View File
@@ -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
```
+1 -1
View File
@@ -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 {
+2 -2
View File
@@ -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,
@@ -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 = <String>[
_resolvePath('gen/dartdevc_aot.dart.snapshot'),
snapshotName,
'--sound-null-safety',
'--dart-sdk-summary',
_resolvePath('ddc_outline.dill'),
+2 -3
View File
@@ -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.
@@ -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
/// ```
///
+1 -1
View File
@@ -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;
@@ -80,7 +80,7 @@ List<String> _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'],
@@ -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'
+4 -6
View File
@@ -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));
@@ -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;
+1 -1
View File
@@ -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 "$@"
+1 -1
View File
@@ -51,7 +51,7 @@ config("dart_product_config") {
}
}
config("dart_precompiled_runtime_config") {
config("dart_aotruntime_config") {
defines = []
defines += [
"DART_PRECOMPILED_RUNTIME",
+30 -13
View File
@@ -903,15 +903,32 @@ 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 = [
":copy_dart_precompiled_runtime",
":dartaotruntime",
]
}
copy("copy_dart_precompiled_runtime") {
visibility = [ ":dart_precompiled_runtime" ]
deps = [ ":dartaotruntime" ]
src_dir = get_label_info(":dartaotruntime", "root_out_dir")
sources = [ "$src_dir/dartaotruntime${executable_suffix}" ]
outputs = [ "$root_out_dir/dart_precompiled_runtime${executable_suffix}" ]
}
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 +961,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 +995,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",
]
}
@@ -7,7 +7,7 @@
"//runtime/vm.shard.cml",
],
program: {
binary: "exe.stripped/dart_precompiled_runtime",
binary: "exe.stripped/dartaotruntime",
runner: "elf_test_runner",
},
capabilities: [
+5 -5
View File
@@ -7,7 +7,7 @@
#include <string.h>
// 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();
@@ -34,7 +34,7 @@
#include <limits>
// 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"
+12 -14
View File
@@ -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
+2 -2
View File
@@ -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
```
+3 -3
View File
@@ -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",
],
+5 -5
View File
@@ -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.<anonymous closure> (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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"
@@ -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);
}
});
}
@@ -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);
@@ -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
+1 -1
View File
@@ -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),
+2 -2
View File
@@ -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
```
```
+2 -2
View File
@@ -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",
]
+31 -16
View File
@@ -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" ]
}
}
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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) ||
@@ -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;
}
+18 -18
View File
@@ -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"
]
},
{
+3 -3
View File
@@ -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 \
+2 -2
View File
@@ -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')
+2 -2
View File
@@ -31,7 +31,7 @@ void main(List<String> 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<String> args) async {
return await run(['$buildDir/offsets_extractor']);
}).then<String>((lines) => lines.join('\n')),
forAllConfigurationsMode((String buildDir, _, _) async {
return await run(['$buildDir/offsets_extractor_precompiled_runtime']);
return await run(['$buildDir/offsets_extractor_aotruntime']);
}).then<String>((lines) => lines.join('\n')),
).wait;
-4
View File
@@ -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
+7 -1
View File
@@ -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
+12 -4
View File
@@ -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
}
+7 -1
View File
@@ -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
+12 -5
View File
@@ -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
}