Skip to content

Commit

Permalink
"[SDK/VM] - Rename dart_precompiled_runtime to dartaotruntime, ensure…
Browse files Browse the repository at this point in the history
…s 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 75e6a74.

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 1b331d0.
>
> 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>
  • Loading branch information
a-siva authored and Commit Queue committed Nov 6, 2024
1 parent 1d4c570 commit f81a402
Show file tree
Hide file tree
Showing 46 changed files with 220 additions and 150 deletions.
28 changes: 24 additions & 4 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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") {
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -367,7 +387,7 @@ if (is_fuchsia) {

test_binaries = [
"dart",
"dart_precompiled_runtime",
"dartaotruntime",
"run_vm_tests",
]

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/NativeCall/native/native_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion docs/Kernel-developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion pkg/dart2wasm/tool/compile_benchmark
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/dartdev/lib/src/sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 7 additions & 5 deletions pkg/dev_compiler/test/worker/worker_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
5 changes: 2 additions & 3 deletions pkg/dynamic_modules/test/runner/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/front_end/lib/src/linux_and_intel_specific_perf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// ```
///
Expand Down
2 changes: 1 addition & 1 deletion pkg/smith/lib/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pkg/test_runner/lib/src/build_configurations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion pkg/test_runner/lib/src/compiler_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
10 changes: 4 additions & 6 deletions pkg/test_runner/lib/src/process_queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -646,19 +646,17 @@ 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(
abstractSocketTest, '$devicedir/abstract_socket_test'));
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));
Expand All @@ -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));
Expand Down
6 changes: 3 additions & 3 deletions pkg/test_runner/lib/src/runtime_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/tool/dart_precompiled_runtime2
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
2 changes: 1 addition & 1 deletion runtime/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ config("dart_product_config") {
}
}

config("dart_precompiled_runtime_config") {
config("dart_aotruntime_config") {
defines = []
defines += [
"DART_PRECOMPILED_RUNTIME",
Expand Down
43 changes: 30 additions & 13 deletions runtime/bin/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down Expand Up @@ -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",
Expand All @@ -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",
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"//runtime/vm.shard.cml",
],
program: {
binary: "exe.stripped/dart_precompiled_runtime",
binary: "exe.stripped/dartaotruntime",
runner: "elf_test_runner",
},
capabilities: [
Expand Down
10 changes: 5 additions & 5 deletions runtime/bin/entrypoints_verification_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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); \
}

Expand All @@ -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); \
}

Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit f81a402

Please sign in to comment.