Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/archives/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ if (build_engine_artifacts && !is_android) {
destination = "vm_isolate_snapshot.bin"
},
{
source = "$root_gen_dir/frontend_server.dart.snapshot"
destination = "frontend_server.dart.snapshot"
source = "$root_gen_dir/frontend_server_aot.dart.snapshot"
destination = "frontend_server_aot.dart.snapshot"
},
]
}
Expand Down
5 changes: 3 additions & 2 deletions build/dart/rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ template("flutter_frontend_server") {
if (is_win) {
ext = ".exe"
}
dart = rebase_path("$host_prebuilt_dart_sdk/bin/dart$ext", root_out_dir)
dart = rebase_path("$host_prebuilt_dart_sdk/bin/dartaotruntime$ext",
root_out_dir)
frontend_server =
rebase_path("$root_gen_dir/frontend_server.dart.snapshot")
rebase_path("$root_gen_dir/frontend_server_aot.dart.snapshot")

args = [ dart ] + common_vm_args + [ frontend_server ] + common_args
}
Expand Down
9 changes: 4 additions & 5 deletions flutter_frontend_server/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import("//flutter/common/config.gni")

copy("frontend_server") {
if (flutter_prebuilt_dart_sdk) {
snapshot =
"$host_prebuilt_dart_sdk/bin/snapshots/frontend_server.dart.snapshot"
snapshot = "$host_prebuilt_dart_sdk/bin/snapshots/frontend_server_aot.dart.snapshot"
} else {
deps = [ "$dart_src/utils/kernel-service:frontend_server" ]
snapshot = "$root_out_dir/frontend_server.dart.snapshot"
deps = [ "$dart_src/utils/kernel-service:frontend_server_aot" ]
snapshot = "$root_out_dir/frontend_server_aot.dart.snapshot"
}

sources = [ snapshot ]
outputs = [ "$root_gen_dir/frontend_server.dart.snapshot" ]
outputs = [ "$root_gen_dir/frontend_server_aot.dart.snapshot" ]
}
5 changes: 3 additions & 2 deletions flutter_frontend_server/test/to_string_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Future<void> main(List<String> args) async {
}

final String dart = Platform.resolvedExecutable;
final String dartaotruntime = path.join(path.dirname(Platform.resolvedExecutable), 'dartaotruntime');
final String buildDir = args[0];
final String frontendServer = args[1];
final String sdkRoot = args[2];
Expand All @@ -35,7 +36,7 @@ Future<void> main(List<String> args) async {
}

test('Without flag', () {
checkProcessResult(Process.runSync(dart, <String>[
checkProcessResult(Process.runSync(dartaotruntime, <String>[
frontendServer,
'--sdk-root=$sdkRoot',
'--target=flutter',
Expand All @@ -59,7 +60,7 @@ Future<void> main(List<String> args) async {
});

test('With flag', () {
checkProcessResult(Process.runSync(dart, <String>[
checkProcessResult(Process.runSync(dartaotruntime, <String>[
frontendServer,
'--sdk-root=$sdkRoot',
'--target=flutter',
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fuchsia_host_bundle("dart_binaries") {

_frontend_server_path =
rebase_path(get_label_info(_frontend_server_label, "root_gen_dir") +
"/frontend_server.dart.snapshot")
"/frontend_server_aot.dart.snapshot")

_list_libraries_path =
rebase_path(get_label_info(_list_libraries_label, "root_gen_dir") +
Expand Down
4 changes: 2 additions & 2 deletions testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ def build_dart_host_test_list(build_dir):
os.path.join('flutter', 'flutter_frontend_server'),
[
build_dir,
os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'),
os.path.join(build_dir, 'gen', 'frontend_server_aot.dart.snapshot'),
os.path.join(build_dir, 'flutter_patched_sdk')
],
),
Expand All @@ -949,7 +949,7 @@ def build_dart_host_test_list(build_dir):
(
os.path.join('flutter', 'tools', 'const_finder'),
[
os.path.join(build_dir, 'gen', 'frontend_server.dart.snapshot'),
os.path.join(build_dir, 'gen', 'frontend_server_aot.dart.snapshot'),
os.path.join(build_dir, 'flutter_patched_sdk'),
os.path.join(build_dir, 'dart-sdk', 'lib', 'libraries.json'),
],
Expand Down
3 changes: 2 additions & 1 deletion tools/const_finder/test/const_finder_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void expectInstances(dynamic value, dynamic expected, Compiler compiler) {
// This test is assuming the `dart` used to invoke the tests is compatible
// with the version of package:kernel in //third-party/dart/pkg/kernel
final String dart = Platform.resolvedExecutable;
final String dartaotruntime = path.join(path.dirname(Platform.resolvedExecutable), 'dartaotruntime');

void _checkRecursion(String dillPath, Compiler compiler) {
stdout.writeln('Checking recursive calls.');
Expand Down Expand Up @@ -443,7 +444,7 @@ class _Test {
}

void _compileAOTDill() {
checkProcessResult(Process.runSync(dart, <String>[
checkProcessResult(Process.runSync(dartaotruntime, <String>[
frontendServer,
'--sdk-root=$sdkRoot',
'--target=flutter',
Expand Down