Rename vm_platform_strong.dill to vm_platform.dill.
The name has always been annoying because it did not add strong typing. And now there aren't variants of the VM platform to distinguish. Leave a copy at the old name to not immediately break illegal uses. TEST=ci Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,flutter-frontend-try,flutter-linux-try Change-Id: Ie76fa7f16940aa1ba8d582eb5197f0ae55dc8938 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429828 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
Commit Queue
parent
e0a91d5304
commit
ab4f9351b1
@@ -8,10 +8,7 @@ import 'dart:io';
|
||||
|
||||
const executables = <String>['dart', 'dartaotruntime'];
|
||||
|
||||
const libs = <String>[
|
||||
'vm_platform_strong.dill',
|
||||
'vm_platform_strong_product.dill',
|
||||
];
|
||||
const libs = <String>['vm_platform.dill', 'vm_platform_product.dill'];
|
||||
|
||||
const snapshots = <String>[
|
||||
'analysis_server',
|
||||
|
||||
@@ -90,7 +90,7 @@ def main(argv):
|
||||
return 1
|
||||
|
||||
platform_dill = os.path.join(prebuilt_sdk, "lib", "_internal",
|
||||
"vm_platform_strong.dill")
|
||||
"vm_platform.dill")
|
||||
if not os.path.isfile(platform_dill):
|
||||
print("Binary not found: " + platform_dill)
|
||||
return 1
|
||||
|
||||
@@ -360,8 +360,7 @@ trace to find the place to insert the appropriate support.
|
||||
self.extra_paths.add(self.rebase(arg))
|
||||
self.extra_paths.add(
|
||||
self.rebase(
|
||||
os.path.join(self.dart_subdir,
|
||||
'vm_platform_strong.dill')))
|
||||
os.path.join(self.dart_subdir, 'vm_platform.dill')))
|
||||
return self.parse_kernel_service_snapshot()
|
||||
else:
|
||||
self.unsupported('dart', arg)
|
||||
@@ -509,7 +508,7 @@ trace to find the place to insert the appropriate support.
|
||||
if sdk.endswith('libraries.json'):
|
||||
sdk = os.path.dirname(sdk)
|
||||
self.extra_paths.add(self.rebase(sdk))
|
||||
elif len(compile_platform_args) == 2: # vm_outline_strong dill
|
||||
elif len(compile_platform_args) == 2: # vm_outline dill
|
||||
arg = self.rebase(arg)
|
||||
elif len(compile_platform_args) == 3: # platform dill
|
||||
arg = self.rebase(arg)
|
||||
|
||||
@@ -37,7 +37,7 @@ import 'options.dart' show BytecodeOptions;
|
||||
|
||||
final ArgParser _argParser = ArgParser(allowTrailingOptions: true)
|
||||
..addOption('platform',
|
||||
help: 'Path to vm_platform_strong.dill file', defaultsTo: null)
|
||||
help: 'Path to vm_platform.dill file', defaultsTo: null)
|
||||
..addOption('packages',
|
||||
help: 'Path to .dart_tool/package_config.json file', defaultsTo: null)
|
||||
..addOption('output',
|
||||
@@ -89,7 +89,7 @@ final ArgParser _argParser = ArgParser(allowTrailingOptions: true)
|
||||
defaultsTo: Verbosity.defaultValue);
|
||||
|
||||
final String _usage = '''
|
||||
Usage: dart2bytecode --platform vm_platform_strong.dill [--import-dill host_app.dill] [--validate dynamic_interface.yaml] [options] input.dart
|
||||
Usage: dart2bytecode --platform vm_platform.dill [--import-dill host_app.dill] [--validate dynamic_interface.yaml] [options] input.dart
|
||||
Compiles Dart sources to Dart bytecode.
|
||||
|
||||
Options:
|
||||
|
||||
@@ -60,7 +60,7 @@ runTestCase(Uri source) async {
|
||||
Future<Component> compileTestCaseToKernelProgram(Uri sourceUri,
|
||||
{required Target target}) async {
|
||||
final platformKernel =
|
||||
computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
|
||||
computePlatformBinariesLocation().resolve('vm_platform.dill');
|
||||
final options = CompilerOptions()
|
||||
..target = target
|
||||
..additionalDills = <Uri>[platformKernel]
|
||||
|
||||
@@ -29,13 +29,13 @@ final platformDill = path.join(
|
||||
binDir.parent.path,
|
||||
'lib',
|
||||
'_internal',
|
||||
'vm_platform_strong.dill',
|
||||
'vm_platform.dill',
|
||||
);
|
||||
final productPlatformDill = path.join(
|
||||
binDir.parent.path,
|
||||
'lib',
|
||||
'_internal',
|
||||
'vm_platform_strong_product.dill',
|
||||
'vm_platform_product.dill',
|
||||
);
|
||||
|
||||
// Maximum page size across all supported architectures (arm64 macOS has 16K
|
||||
|
||||
@@ -1793,7 +1793,7 @@ class D8SuiteRunner extends DdcFeServerSuiteRunner with D8TestRunner {
|
||||
class VMSuiteRunner extends HotReloadFeServerSuiteRunner {
|
||||
final String vmPlatformDillFromSdkRoot = fe_shared.relativizeUri(
|
||||
sdkRoot,
|
||||
buildRootUri.resolve('vm_platform_strong.dill'),
|
||||
buildRootUri.resolve('vm_platform.dill'),
|
||||
fe_shared.isWindows,
|
||||
);
|
||||
late Uri outputDirectoryUri;
|
||||
|
||||
@@ -99,7 +99,7 @@ Uri dart2bytecodeSnapshot = buildRootUri.resolve(
|
||||
Uri aotRuntimeBin = buildRootUri.resolve(
|
||||
useProduct ? 'dartaotruntime_product' : 'dartaotruntime',
|
||||
);
|
||||
Uri vmPlatformDill = buildRootUri.resolve('vm_platform_strong.dill');
|
||||
Uri vmPlatformDill = buildRootUri.resolve('vm_platform.dill');
|
||||
|
||||
Uri dart2wasmSnapshot = dartBin.resolve('snapshots/dart2wasm_product.snapshot');
|
||||
Uri dart2wasmPlatformDill = buildRootUri.resolve('dart2wasm_platform.dill');
|
||||
|
||||
@@ -820,7 +820,7 @@ class ProcessedOptions {
|
||||
// Infer based on the sdkRoot, but only when `compileSdk` is false,
|
||||
// otherwise the default intent was to compile the sdk from sources and
|
||||
// not to load an sdk summary file.
|
||||
_sdkSummary = root?.resolve("vm_platform_strong.dill");
|
||||
_sdkSummary = root?.resolve("vm_platform.dill");
|
||||
}
|
||||
|
||||
if (_raw.librariesSpecificationUri != null) {
|
||||
|
||||
@@ -28,11 +28,9 @@ String? computePlatformDillName(Target target, void Function() onError) {
|
||||
case 'dart2js_server':
|
||||
return 'dart2js_server_platform.dill';
|
||||
case 'vm':
|
||||
// TODO(johnniwinther): Stop generating 'vm_platform.dill' and rename
|
||||
// 'vm_platform_strong.dill' to 'vm_platform.dill'.
|
||||
return "vm_platform_strong.dill";
|
||||
return 'vm_platform.dill';
|
||||
case 'none':
|
||||
return "vm_platform_strong.dill";
|
||||
return 'vm_platform.dill';
|
||||
case 'wasm':
|
||||
return 'dart2wasm_outline.dill';
|
||||
// Coverage-ignore(suite): Not run.
|
||||
|
||||
@@ -23,8 +23,8 @@ Future<void> main(List<String> arguments) async {
|
||||
|
||||
Directory tmp =
|
||||
Directory.systemTemp.createTempSync("compile_platform_coverage");
|
||||
String outlinePath = tmp.uri.resolve("vm_outline_strong.dill").toFilePath();
|
||||
String platformPath = tmp.uri.resolve("vm_platform_strong.dill").toFilePath();
|
||||
String outlinePath = tmp.uri.resolve("vm_outline.dill").toFilePath();
|
||||
String platformPath = tmp.uri.resolve("vm_platform.dill").toFilePath();
|
||||
|
||||
await compilePlatformEntryPoint([
|
||||
"dart:core",
|
||||
|
||||
@@ -629,12 +629,12 @@ Future<Context> createContext(
|
||||
final Uri entryPoint = base.resolve("nothing.dart");
|
||||
|
||||
/// The custom URI used to locate the dill file in the MemoryFileSystem.
|
||||
final Uri sdkSummary = base.resolve("vm_platform_strong.dill");
|
||||
final Uri sdkSummary = base.resolve("vm_platform.dill");
|
||||
|
||||
/// The actual location of the dill file.
|
||||
final Uri sdkSummaryFile =
|
||||
computePlatformBinariesLocation(forceBuildDir: true)
|
||||
.resolve("vm_platform_strong.dill");
|
||||
.resolve("vm_platform.dill");
|
||||
|
||||
final MemoryFileSystem fs = new MemoryFileSystem(base);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ CompilerOptions getOptions() {
|
||||
..onDiagnostic = (DiagnosticMessage message) {
|
||||
// Ignored.
|
||||
};
|
||||
options.sdkSummary = sdkRoot.resolve("vm_platform_strong.dill");
|
||||
options.sdkSummary = sdkRoot.resolve("vm_platform.dill");
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Future<void> testDart2jsCompile() async {
|
||||
{
|
||||
// Check that we don't include the source from files from the sdk.
|
||||
final Uri sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
|
||||
Uri platformUri = sdkRoot.resolve("vm_platform_strong.dill");
|
||||
Uri platformUri = sdkRoot.resolve("vm_platform.dill");
|
||||
Component cSdk = new Component();
|
||||
new BinaryBuilder(new File.fromUri(platformUri).readAsBytesSync(),
|
||||
disableLazyReading: false)
|
||||
|
||||
@@ -194,12 +194,12 @@ class TestCase {
|
||||
Future<Context> createContext(
|
||||
Chain suite, Map<String, String> environment) async {
|
||||
/// The custom URI used to locate the dill file in the MemoryFileSystem.
|
||||
final Uri sdkSummary = base.resolve("vm_platform_strong.dill");
|
||||
final Uri sdkSummary = base.resolve("vm_platform.dill");
|
||||
|
||||
/// The actual location of the dill file.
|
||||
final Uri sdkSummaryFile =
|
||||
computePlatformBinariesLocation(forceBuildDir: true)
|
||||
.resolve("vm_platform_strong.dill");
|
||||
.resolve("vm_platform.dill");
|
||||
|
||||
final MemoryFileSystem fs = new MemoryFileSystem(base);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Future<void> test({required bool sdkFromSource}) async {
|
||||
} else {
|
||||
optionBuilder.sdkSummary =
|
||||
computePlatformBinariesLocation(forceBuildDir: true)
|
||||
.resolve("vm_platform_strong.dill");
|
||||
.resolve("vm_platform.dill");
|
||||
}
|
||||
|
||||
final Uri helloDart =
|
||||
|
||||
@@ -117,7 +117,7 @@ class Tester {
|
||||
helper2File = base.resolve("helper2.dart");
|
||||
entryPoint = base.resolve("small.dart");
|
||||
entryPointImportDartFoo = base.resolve("small_foo.dart");
|
||||
platformUri = sdkRoot.resolve("vm_platform_strong.dill");
|
||||
platformUri = sdkRoot.resolve("vm_platform.dill");
|
||||
sdkSummaryData = await new File.fromUri(platformUri).readAsBytes();
|
||||
errorMessages = <DiagnosticMessage>[];
|
||||
warningMessages = <DiagnosticMessage>[];
|
||||
|
||||
@@ -2489,7 +2489,7 @@ void checkIsEqual(List<int> a, List<int> b) {
|
||||
|
||||
CompilerOptions getOptions({Target? target, String? sdkSummary}) {
|
||||
target ??= new VmTarget(new TargetFlags());
|
||||
sdkSummary ??= 'vm_platform_strong.dill';
|
||||
sdkSummary ??= 'vm_platform.dill';
|
||||
final Uri sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
|
||||
CompilerOptions options = new CompilerOptions()
|
||||
..target = target
|
||||
|
||||
@@ -47,7 +47,7 @@ abstract class UnmodifiableMapView<K, V> extends MapView<K, V>
|
||||
};
|
||||
|
||||
Future<void> test() async {
|
||||
final String platformBaseName = "vm_platform_strong.dill";
|
||||
final String platformBaseName = "vm_platform.dill";
|
||||
final Uri base = Uri.parse("org-dartlang-test:///");
|
||||
final Uri platformDill = base.resolve(platformBaseName);
|
||||
final List<int> platformDillBytes = await new File.fromUri(
|
||||
|
||||
@@ -739,7 +739,7 @@ class Compile extends Step<Example?, Null, MessageTestSuite> {
|
||||
await suite.compiler.batchCompile(
|
||||
new CompilerOptions()
|
||||
..sdkSummary = computePlatformBinariesLocation(forceBuildDir: true)
|
||||
.resolve("vm_platform_strong.dill")
|
||||
.resolve("vm_platform.dill")
|
||||
..explicitExperimentalFlags = example.experimentalFlags ?? {}
|
||||
..target = new VmTarget(new TargetFlags())
|
||||
..fileSystem = new HybridFileSystem(suite.fileSystem)
|
||||
|
||||
@@ -163,7 +163,7 @@ void main() async {
|
||||
node.enclosingClass != null;
|
||||
|
||||
final Uri platform = computePlatformBinariesLocation(forceBuildDir: true)
|
||||
.resolve("vm_platform_strong.dill");
|
||||
.resolve("vm_platform.dill");
|
||||
final Uint8List platformBinary =
|
||||
await new File(platform.toFilePath()).readAsBytes();
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ class ProcessedOptionsTest {
|
||||
..sdkRoot = Uri.parse('org-dartlang-test:///sdk/dir/')
|
||||
..compileSdk = false;
|
||||
expect(new ProcessedOptions(options: raw).sdkSummary,
|
||||
Uri.parse('org-dartlang-test:///sdk/dir/vm_platform_strong.dill'));
|
||||
Uri.parse('org-dartlang-test:///sdk/dir/vm_platform.dill'));
|
||||
|
||||
// But it is left null when compile-sdk is true
|
||||
raw = new CompilerOptions()
|
||||
@@ -448,7 +448,7 @@ class ProcessedOptionsTest {
|
||||
.entityForUri(sdkRoot)
|
||||
.writeAsStringSync('\n');
|
||||
fileSystem
|
||||
.entityForUri(sdkRoot.resolve('vm_platform_strong.dill'))
|
||||
.entityForUri(sdkRoot.resolve('vm_platform.dill'))
|
||||
.writeAsStringSync('\n');
|
||||
fileSystem
|
||||
.entityForUri(Uri.parse('org-dartlang-test:///foo.dart'))
|
||||
@@ -523,7 +523,7 @@ class ProcessedOptionsTest {
|
||||
Future<void> test_validateOptions_inferred_summary_exists() async {
|
||||
var sdkRoot = Uri.parse('org-dartlang-test:///sdk/root/');
|
||||
var sdkSummary =
|
||||
Uri.parse('org-dartlang-test:///sdk/root/vm_platform_strong.dill');
|
||||
Uri.parse('org-dartlang-test:///sdk/root/vm_platform.dill');
|
||||
fileSystem.entityForUri(sdkRoot).writeAsStringSync('\n');
|
||||
fileSystem.entityForUri(sdkSummary).writeAsStringSync('\n');
|
||||
fileSystem
|
||||
|
||||
@@ -125,9 +125,9 @@ class TestCompiler {
|
||||
|
||||
static CompilerAndOptions initialize() {
|
||||
final Uri base = Uri.parse("org-dartlang-test:///");
|
||||
final Uri sdkSummary = base.resolve("vm_platform_strong.dill");
|
||||
final Uri sdkSummary = base.resolve("vm_platform.dill");
|
||||
final Uri sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
|
||||
Uri platformUri = sdkRoot.resolve("vm_platform_strong.dill");
|
||||
Uri platformUri = sdkRoot.resolve("vm_platform.dill");
|
||||
final List<int> sdkSummaryData =
|
||||
new File.fromUri(platformUri).readAsBytesSync();
|
||||
MemoryFileSystem fs = new MemoryFileSystem(base);
|
||||
|
||||
@@ -74,7 +74,7 @@ Error: No Dart file specified.
|
||||
"compile-platform": {
|
||||
"exitCode": 1,
|
||||
"stdout": """
|
||||
Usage: compile_platform [options] dart-library-uri libraries.json vm_outline_strong.dill platform.dill outline.dill
|
||||
Usage: compile_platform [options] dart-library-uri libraries.json vm_outline.dill platform.dill outline.dill
|
||||
|
||||
Compiles Dart SDK platform to the Dill/Kernel IR format.
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ Message computeUsage(String programName, bool verbose) {
|
||||
case "compile_platform":
|
||||
summary = "Compiles Dart SDK platform to the Dill/Kernel IR format.";
|
||||
basicUsage = "Usage: $programName [options]"
|
||||
" dart-library-uri libraries.json vm_outline_strong.dill"
|
||||
" dart-library-uri libraries.json vm_outline.dill"
|
||||
" platform.dill outline.dill\n";
|
||||
}
|
||||
StringBuffer sb = new StringBuffer(basicUsage);
|
||||
|
||||
@@ -171,7 +171,7 @@ void _compileRevision(String gitCommit, {Stopwatch? stopwatch}) {
|
||||
"stderr: ${processResult.stderr}\n"
|
||||
"stdout: ${processResult.stdout}";
|
||||
}
|
||||
new File("$changingWorkingDir/out/ReleaseX64/vm_platform_strong.dill")
|
||||
new File("$changingWorkingDir/out/ReleaseX64/vm_platform.dill")
|
||||
.copySync("$snapshotsPath/platform.dill.$gitCommit");
|
||||
print("Done building the platform for $gitCommit "
|
||||
"after ${stopwatch.elapsed.inSeconds} seconds.");
|
||||
|
||||
@@ -15,7 +15,7 @@ void main(List<String> arguments) {
|
||||
asyncTest(() async {
|
||||
await withTemporaryDirectory("compile_platform_test_", (Uri tmp) async {
|
||||
Uri platformDill = tmp.resolve("vm_platform.dill");
|
||||
Uri outlineDill = tmp.resolve("vm_outline_strong.dill");
|
||||
Uri outlineDill = tmp.resolve("vm_outline.dill");
|
||||
ProcessResult result = await Process.run(dartVm.toFilePath(), <String>[
|
||||
compilePlatform.toFilePath(),
|
||||
"-v",
|
||||
|
||||
@@ -15,7 +15,7 @@ void main(List<String> arguments) {
|
||||
asyncTest(() async {
|
||||
await withTemporaryDirectory("compile_platform_test_", (Uri tmp) async {
|
||||
Uri platformDill = tmp.resolve("vm_platform.dill");
|
||||
Uri outlineDill = tmp.resolve("vm_outline_strong.dill");
|
||||
Uri outlineDill = tmp.resolve("vm_outline.dill");
|
||||
ProcessResult result = await Process.run(dartVm.toFilePath(), <String>[
|
||||
compilePlatform.toFilePath(),
|
||||
"-v",
|
||||
|
||||
@@ -40,8 +40,8 @@ class Helper {
|
||||
Future<void> setup() async {
|
||||
final Uri sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
|
||||
base = Uri.parse("org-dartlang-test:///");
|
||||
sdkSummary = base.resolve("vm_platform_strong.dill");
|
||||
Uri platformUri = sdkRoot.resolve("vm_platform_strong.dill");
|
||||
sdkSummary = base.resolve("vm_platform.dill");
|
||||
Uri platformUri = sdkRoot.resolve("vm_platform.dill");
|
||||
sdkSummaryData = await new File.fromUri(platformUri).readAsBytes();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import 'incremental_perf.dart' as m show main;
|
||||
Future<void> main() async {
|
||||
var sdkOutline = computePlatformBinariesLocation(forceBuildDir: true).resolve(
|
||||
// TODO(sigmund): switch to `vm_outline.dill` (issue #29881).
|
||||
"vm_platform_strong.dill");
|
||||
"vm_platform.dill");
|
||||
|
||||
final ikgBenchmarks = Platform.script.resolve('../benchmarks/ikg/');
|
||||
final helloEntry = ikgBenchmarks.resolve('hello.dart');
|
||||
|
||||
@@ -351,7 +351,7 @@ class ResidentFrontendServer {
|
||||
static final Uri _sdkBinariesUri = computePlatformBinariesLocation();
|
||||
static final Uri _sdkUri = _sdkBinariesUri.resolve('../../');
|
||||
static final Uri _platformKernelUri =
|
||||
_sdkBinariesUri.resolve('vm_platform_strong.dill');
|
||||
_sdkBinariesUri.resolve('vm_platform.dill');
|
||||
static final Map<String, ResidentCompiler> compilers = {};
|
||||
|
||||
/// Returns a [ResidentCompiler] that has been configured with
|
||||
|
||||
@@ -540,7 +540,7 @@ class _Test {
|
||||
checkProcessResult(Process.runSync(dart, <String>[
|
||||
frontendServer,
|
||||
'--sdk-root=$sdkRoot',
|
||||
'--platform=vm_platform_strong.dill',
|
||||
'--platform=vm_platform.dill',
|
||||
'--target=vm',
|
||||
'--aot',
|
||||
'--tfa',
|
||||
@@ -581,4 +581,4 @@ class Dart2JSDeepCollectionEquality extends DeepCollectionEquality {
|
||||
}
|
||||
return super.equals(e1, e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -562,7 +562,7 @@ Future<void> main() async {
|
||||
|
||||
group('full compiler tests', () {
|
||||
final Uri platformKernel =
|
||||
computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
|
||||
computePlatformBinariesLocation().resolve('vm_platform.dill');
|
||||
final Uri ddcPlatformKernel =
|
||||
computePlatformBinariesLocation().resolve('ddc_outline.dill');
|
||||
final Uri sdkRoot = computePlatformBinariesLocation();
|
||||
|
||||
@@ -16,7 +16,7 @@ import 'frontend_server_test.dart';
|
||||
void main() async {
|
||||
group('full compiler tests', () {
|
||||
final Uri platformKernel =
|
||||
computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
|
||||
computePlatformBinariesLocation().resolve('vm_platform.dill');
|
||||
final Uri sdkRoot = computePlatformBinariesLocation();
|
||||
|
||||
late Directory tempDir;
|
||||
|
||||
@@ -1434,7 +1434,7 @@ abstract mixin class VMKernelCompilerMixin {
|
||||
kernelBinariesFolder += '/dart-sdk/lib/_internal';
|
||||
}
|
||||
|
||||
var vmPlatform = '$kernelBinariesFolder/vm_platform_strong.dill';
|
||||
var vmPlatform = '$kernelBinariesFolder/vm_platform.dill';
|
||||
|
||||
var dillFile = tempKernelFile(tempDir);
|
||||
|
||||
@@ -1483,7 +1483,7 @@ class FastaCompilerConfiguration extends CompilerConfiguration {
|
||||
dillDir = buildDirectory.resolve("dart-sdk/lib/_internal/");
|
||||
}
|
||||
|
||||
var platformDill = dillDir.resolve("vm_platform_strong.dill");
|
||||
var platformDill = dillDir.resolve("vm_platform.dill");
|
||||
|
||||
var vmExecutable = buildDirectory
|
||||
.resolve(configuration.useSdk ? "dart-sdk/bin/dart" : "dart");
|
||||
@@ -1588,8 +1588,8 @@ class BytecodeCompilerConfiguration extends CompilerConfiguration {
|
||||
: '${_configuration.buildDirectory}/gen/dart2bytecode.dart.snapshot';
|
||||
|
||||
String platformKernelFile() => _useSdk
|
||||
? '${_configuration.buildDirectory}/dart-sdk/lib/_internal/vm_platform_strong.dill'
|
||||
: '${_configuration.buildDirectory}/vm_platform_strong.dill';
|
||||
? '${_configuration.buildDirectory}/dart-sdk/lib/_internal/vm_platform.dill'
|
||||
: '${_configuration.buildDirectory}/vm_platform.dill';
|
||||
|
||||
String tempBytecodeFile(String tempDir) =>
|
||||
Path('$tempDir/out.bytecode').toNativePath();
|
||||
|
||||
@@ -20,7 +20,7 @@ import 'package:vm/kernel_front_end.dart'
|
||||
final ArgParser _argParser = createCompilerArgParser();
|
||||
|
||||
final String _usage = '''
|
||||
Usage: dart pkg/vm/bin/gen_kernel.dart --platform vm_platform_strong.dill [options] input.dart
|
||||
Usage: dart pkg/vm/bin/gen_kernel.dart --platform vm_platform.dill [options] input.dart
|
||||
Compiles Dart sources to a kernel binary file for Dart VM.
|
||||
|
||||
Options:
|
||||
|
||||
@@ -634,7 +634,7 @@ Future _processExpressionCompilationRequest(request) async {
|
||||
platformKernel = dartPlatformKernel;
|
||||
} else {
|
||||
final Uri platformUri = computePlatformBinariesLocation().resolve(
|
||||
'vm_platform_strong.dill',
|
||||
'vm_platform.dill',
|
||||
);
|
||||
final File platformFile = new File.fromUri(platformUri);
|
||||
if (platformFile.existsSync()) {
|
||||
@@ -878,7 +878,7 @@ Future _processLoadRequest(request) async {
|
||||
platformKernel = request[3];
|
||||
} else {
|
||||
platformKernelPath = computePlatformBinariesLocation().resolve(
|
||||
'vm_platform_strong.dill',
|
||||
'vm_platform.dill',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ import 'transformations/vm_constant_evaluator.dart' as vm_constant_evaluator;
|
||||
void declareCompilerOptions(ArgParser args) {
|
||||
args.addOption(
|
||||
'platform',
|
||||
help: 'Path to vm_platform_strong.dill file',
|
||||
help: 'Path to vm_platform.dill file',
|
||||
defaultsTo: null,
|
||||
);
|
||||
args.addOption(
|
||||
|
||||
@@ -40,7 +40,7 @@ Future<Component> compileTestCaseToKernelProgram(
|
||||
final platformFileName =
|
||||
(target is WasmTarget)
|
||||
? target.platformFile
|
||||
: 'vm_platform_strong.dill';
|
||||
: 'vm_platform.dill';
|
||||
final platformKernel = computePlatformBinariesLocation().resolve(
|
||||
platformFileName,
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ import 'common_test_utils.dart';
|
||||
|
||||
main() {
|
||||
final platformKernel = computePlatformBinariesLocation().resolve(
|
||||
'vm_platform_strong.dill',
|
||||
'vm_platform.dill',
|
||||
);
|
||||
final sdkRoot = computePlatformBinariesLocation();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ final String sdkDir = Platform.script.resolve('../../..').toFilePath();
|
||||
|
||||
String platformPath() =>
|
||||
computePlatformBinariesLocation()
|
||||
.resolve('vm_platform_strong.dill')
|
||||
.resolve('vm_platform.dill')
|
||||
.toFilePath();
|
||||
|
||||
const String mainScript = 'pkg/vm/bin/gen_kernel.dart';
|
||||
|
||||
@@ -15,15 +15,13 @@ import 'package:vm/modular/target/vm.dart';
|
||||
import 'package:vm/kernel_front_end.dart';
|
||||
|
||||
main() async {
|
||||
Uri sdkSummary = sdkRootFile(
|
||||
Platform.executable,
|
||||
).resolve('vm_platform_strong.dill');
|
||||
Uri sdkSummary = sdkRootFile(Platform.executable).resolve('vm_platform.dill');
|
||||
if (!await File.fromUri(sdkSummary).exists()) {
|
||||
// If we run from the <build-dir>/dart-sdk/bin folder, we need to navigate two
|
||||
// levels up.
|
||||
sdkSummary = sdkRootFile(
|
||||
Platform.executable,
|
||||
).resolve('../../vm_platform_strong.dill');
|
||||
).resolve('../../vm_platform.dill');
|
||||
}
|
||||
|
||||
// Tests are run in the root directory of the sdk checkout.
|
||||
|
||||
@@ -87,11 +87,11 @@ List<MappingPair> getSnapshotMap(Directory tmpDir, File compileDartFile) {
|
||||
}
|
||||
|
||||
final Uri platformDill = computePlatformBinariesLocation().resolve(
|
||||
'vm_platform_strong_product.dill',
|
||||
'vm_platform_product.dill',
|
||||
);
|
||||
final File platformDillFile = new File.fromUri(platformDill);
|
||||
if (!platformDillFile.existsSync()) {
|
||||
throw "Didn't find vm_platform_strong_product at $platformDill";
|
||||
throw "Didn't find vm_platform_product at $platformDill";
|
||||
}
|
||||
|
||||
final Uri tmpDirUri = tmpDir.uri;
|
||||
|
||||
@@ -25,12 +25,12 @@ main() async {
|
||||
late final String platformDill;
|
||||
if (executable.endsWith('ReleaseX64/dart')) {
|
||||
platformDill =
|
||||
Uri.parse(executable).resolve('vm_platform_strong.dill').toFilePath();
|
||||
Uri.parse(executable).resolve('vm_platform.dill').toFilePath();
|
||||
} else if (executable.endsWith('dart-sdk/bin/dart')) {
|
||||
platformDill =
|
||||
Uri.parse(
|
||||
executable,
|
||||
).resolve('../lib/_internal/vm_platform_strong.dill').toFilePath();
|
||||
).resolve('../lib/_internal/vm_platform.dill').toFilePath();
|
||||
} else {
|
||||
print(
|
||||
'Skipping test due to not being run .../ReleaseX64/dart or .../dart-sdk/bin/dart.',
|
||||
|
||||
@@ -142,7 +142,7 @@ function gen_kernel() {
|
||||
}
|
||||
|
||||
# Step 1: Generate Kernel binary from the input Dart source.
|
||||
gen_kernel --platform "${BUILD_DIR}/vm_platform_strong.dill" \
|
||||
gen_kernel --platform "${BUILD_DIR}/vm_platform.dill" \
|
||||
--aot \
|
||||
"${GEN_KERNEL_OPTIONS[@]}" \
|
||||
$PACKAGES \
|
||||
|
||||
@@ -582,7 +582,7 @@ gen_snapshot_action("generate_snapshot_bin") {
|
||||
isolate_snapshot_instructions =
|
||||
"$target_gen_dir/isolate_snapshot_instructions.bin"
|
||||
|
||||
platform_dill = "$root_out_dir/vm_platform_strong_stripped.dill"
|
||||
platform_dill = "$root_out_dir/vm_platform_stripped.dill"
|
||||
inputs = [ platform_dill ]
|
||||
outputs = [
|
||||
vm_snapshot_data,
|
||||
@@ -734,11 +734,11 @@ bin_to_linkable("kernel_service_dill_linkable") {
|
||||
executable = false
|
||||
}
|
||||
|
||||
bin_to_linkable("platform_strong_dill_linkable") {
|
||||
bin_to_linkable("platform_dill_linkable") {
|
||||
deps = [ "../vm:vm_platform" ]
|
||||
input = "$root_out_dir/vm_platform_strong.dill"
|
||||
symbol = "kPlatformStrongDill"
|
||||
size_symbol = "kPlatformStrongDillSize"
|
||||
input = "$root_out_dir/vm_platform.dill"
|
||||
symbol = "kPlatformDill"
|
||||
size_symbol = "kPlatformDillSize"
|
||||
executable = false
|
||||
}
|
||||
|
||||
@@ -776,10 +776,10 @@ source_set("dart_kernel_platform_cc") {
|
||||
]
|
||||
deps = [
|
||||
":kernel_service_dill_linkable",
|
||||
":platform_strong_dill_linkable",
|
||||
":platform_dill_linkable",
|
||||
]
|
||||
sources = get_target_outputs(":kernel_service_dill_linkable") +
|
||||
get_target_outputs(":platform_strong_dill_linkable")
|
||||
get_target_outputs(":platform_dill_linkable")
|
||||
}
|
||||
|
||||
source_set("icudtl_cc") {
|
||||
|
||||
+16
-17
@@ -19,13 +19,13 @@ extern "C" {
|
||||
#if !defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
|
||||
extern const uint8_t kKernelServiceDill[];
|
||||
extern intptr_t kKernelServiceDillSize;
|
||||
extern const uint8_t kPlatformStrongDill[];
|
||||
extern intptr_t kPlatformStrongDillSize;
|
||||
extern const uint8_t kPlatformDill[];
|
||||
extern intptr_t kPlatformDillSize;
|
||||
#else
|
||||
const uint8_t* kKernelServiceDill = nullptr;
|
||||
intptr_t kKernelServiceDillSize = 0;
|
||||
const uint8_t* kPlatformStrongDill = nullptr;
|
||||
intptr_t kPlatformStrongDillSize = 0;
|
||||
const uint8_t* kPlatformDill = nullptr;
|
||||
intptr_t kPlatformDillSize = 0;
|
||||
#endif // !defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
|
||||
}
|
||||
|
||||
@@ -47,11 +47,11 @@ const intptr_t kernel_service_dill_size = kKernelServiceDillSize;
|
||||
#endif
|
||||
|
||||
#if defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
|
||||
const uint8_t* platform_strong_dill = nullptr;
|
||||
const intptr_t platform_strong_dill_size = 0;
|
||||
const uint8_t* platform_dill = nullptr;
|
||||
const intptr_t platform_dill_size = 0;
|
||||
#else
|
||||
const uint8_t* platform_strong_dill = kPlatformStrongDill;
|
||||
const intptr_t platform_strong_dill_size = kPlatformStrongDillSize;
|
||||
const uint8_t* platform_dill = kPlatformDill;
|
||||
const intptr_t platform_dill_size = kPlatformDillSize;
|
||||
#endif
|
||||
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
@@ -80,13 +80,12 @@ DFE::~DFE() {
|
||||
}
|
||||
|
||||
void DFE::Init() {
|
||||
if (platform_strong_dill == nullptr) {
|
||||
if (platform_dill == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
InitKernelServiceAndPlatformDills();
|
||||
Dart_SetDartLibrarySourcesKernel(platform_strong_dill,
|
||||
platform_strong_dill_size);
|
||||
Dart_SetDartLibrarySourcesKernel(platform_dill, platform_dill_size);
|
||||
}
|
||||
|
||||
void DFE::InitKernelServiceAndPlatformDills() {
|
||||
@@ -130,12 +129,12 @@ void DFE::LoadKernelService(const uint8_t** kernel_service_buffer,
|
||||
|
||||
void DFE::LoadPlatform(const uint8_t** kernel_buffer,
|
||||
intptr_t* kernel_buffer_size) {
|
||||
*kernel_buffer = platform_strong_dill;
|
||||
*kernel_buffer_size = platform_strong_dill_size;
|
||||
*kernel_buffer = platform_dill;
|
||||
*kernel_buffer_size = platform_dill_size;
|
||||
}
|
||||
|
||||
bool DFE::CanUseDartFrontend() const {
|
||||
return (platform_strong_dill != nullptr) &&
|
||||
return (platform_dill != nullptr) &&
|
||||
(KernelServiceDillAvailable() || (frontend_filename() != nullptr));
|
||||
}
|
||||
|
||||
@@ -190,9 +189,9 @@ Dart_KernelCompilationResult DFE::CompileScript(const char* script_uri,
|
||||
PathSanitizer path_sanitizer(script_uri);
|
||||
const char* sanitized_uri = path_sanitizer.sanitized_uri();
|
||||
|
||||
return Dart_CompileToKernel(
|
||||
sanitized_uri, platform_strong_dill, platform_strong_dill_size,
|
||||
incremental, for_snapshot, embed_sources, package_config, verbosity());
|
||||
return Dart_CompileToKernel(sanitized_uri, platform_dill, platform_dill_size,
|
||||
incremental, for_snapshot, embed_sources,
|
||||
package_config, verbosity());
|
||||
}
|
||||
|
||||
void DFE::CompileAndReadScript(const char* script_uri,
|
||||
|
||||
@@ -1330,7 +1330,7 @@ void main(int argc, char** argv) {
|
||||
// Note: must read platform only *after* VM flags are parsed because
|
||||
// they might affect how the platform is loaded.
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
// Load vm_platform_strong.dill for dart:* source support.
|
||||
// Load vm_platform.dill for dart:* source support.
|
||||
dfe.Init();
|
||||
dfe.set_verbosity(Options::verbosity_level());
|
||||
if (script_name != nullptr) {
|
||||
|
||||
@@ -226,7 +226,7 @@ At this point enough information is loaded from Kernel binary for runtime to suc
|
||||
> * Compile `hello.dart` to `hello.dill` Kernel binary using CFE
|
||||
> ```console
|
||||
> $ dart pkg/vm/bin/gen_kernel.dart \
|
||||
> --platform out/ReleaseX64/vm_platform_strong.dill \
|
||||
> --platform out/ReleaseX64/vm_platform.dill \
|
||||
> -o hello.dill \
|
||||
> hello.dart
|
||||
> ```
|
||||
@@ -235,7 +235,7 @@ At this point enough information is loaded from Kernel binary for runtime to suc
|
||||
> $ dart pkg/vm/bin/dump_kernel.dart hello.dill hello.kernel.txt
|
||||
> ```
|
||||
>
|
||||
> When you try using `gen_kernel.dart` you will notice that it requires something called *platform*, a Kernel binary containing AST for all core libraries (`dart:core`, `dart:async`, etc). If you have Dart SDK build configured then you can just use platform file from the `out` directory, e.g. `out/ReleaseX64/vm_platform_strong.dill`. Alternatively you can use [`pkg/front_end/tool/compile_platform.dart`][] to generate the platform:
|
||||
> When you try using `gen_kernel.dart` you will notice that it requires something called *platform*, a Kernel binary containing AST for all core libraries (`dart:core`, `dart:async`, etc). If you have Dart SDK build configured then you can just use platform file from the `out` directory, e.g. `out/ReleaseX64/vm_platform.dill`. Alternatively you can use [`pkg/front_end/tool/compile_platform.dart`][] to generate the platform:
|
||||
>
|
||||
> ```console
|
||||
> $ dart pkg/front_end/tool/compile_platform.dart \
|
||||
|
||||
@@ -183,7 +183,7 @@ Running the CFE on a Dart file can be done with the following configuration.
|
||||
"request": "launch",
|
||||
"program": "pkg/vm/bin/gen_kernel.dart",
|
||||
"args": [
|
||||
"--platform=${workspaceFolder}/xcodebuild/ReleaseARM64/vm_platform_strong.dill",
|
||||
"--platform=${workspaceFolder}/xcodebuild/ReleaseARM64/vm_platform.dill",
|
||||
"third_party/pkg/native/pkgs/ffi/test/allocation_test.dart",
|
||||
],
|
||||
"toolArgs": [],
|
||||
|
||||
@@ -48,7 +48,7 @@ Below is the result of running the file both without and with
|
||||
```bash
|
||||
$ python3 tools/build.py -a x64 -m release runtime runtime_precompiled
|
||||
|
||||
$ pkg/vm/tool/gen_kernel --platform out/ReleaseX64/vm_platform_strong.dill -o throws.dill throws.dart
|
||||
$ pkg/vm/tool/gen_kernel --platform out/ReleaseX64/vm_platform.dill -o throws.dill throws.dart
|
||||
|
||||
$ out/ReleaseX64/gen_snapshot --snapshot_kind=app-aot-elf --elf=snapshot.so throws.dill
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ $ tools/test.py -c dartkp -m release $path_to_an_il_test
|
||||
```
|
||||
|
||||
Tests require `gen_snapshot`, `dartaotruntime` and
|
||||
`vm_platform_strong.dill` to be built for the target configuration.
|
||||
`vm_platform.dill` to be built for the target configuration.
|
||||
|
||||
Each IL test should contain one or more of the functions marked with a
|
||||
`@pragma('vm:testing:print-flow-graph'[, 'phases filter'])`.
|
||||
|
||||
@@ -3820,7 +3820,7 @@ DART_EXPORT Dart_Port Dart_KernelPort(void);
|
||||
* Compiles the given `script_uri` to a kernel file.
|
||||
*
|
||||
* \param platform_kernel A buffer containing the kernel of the platform (e.g.
|
||||
* `vm_platform_strong.dill`). The VM does not take ownership of this memory.
|
||||
* `vm_platform.dill`). The VM does not take ownership of this memory.
|
||||
*
|
||||
* \param platform_kernel_size The length of the platform_kernel buffer.
|
||||
*
|
||||
|
||||
@@ -23,7 +23,7 @@ import '../use_flag_test_helper.dart';
|
||||
|
||||
void main(List<String> args) async {
|
||||
if (Platform.isAndroid) {
|
||||
return; // No vm_platform_strong.dill easily available.
|
||||
return; // No vm_platform.dill easily available.
|
||||
}
|
||||
if (isSimulator) {
|
||||
return; // No ffi support on simulators
|
||||
|
||||
@@ -22,7 +22,7 @@ import '../use_flag_test_helper.dart';
|
||||
|
||||
void main(List<String> args) async {
|
||||
if (Platform.isAndroid) {
|
||||
return; // No vm_platform_strong.dill easily available.
|
||||
return; // No vm_platform.dill easily available.
|
||||
}
|
||||
|
||||
asyncStart();
|
||||
|
||||
@@ -36,7 +36,7 @@ main() async {
|
||||
"TSAN": "--target_thread_sanitizer",
|
||||
}[sanitizer]!;
|
||||
|
||||
var nonePlatform = "$out/$mode$arch/vm_platform_strong.dill";
|
||||
var nonePlatform = "$out/$mode$arch/vm_platform.dill";
|
||||
var noneGenSnapshot = "$out/$mode$arch/gen_snapshot";
|
||||
var noneJitRuntime = "$out/$mode$arch/dart";
|
||||
var noneAotRuntime = "$out/$mode$arch/dartaotruntime";
|
||||
|
||||
@@ -16,16 +16,16 @@ final sdkDir = path.dirname(path.dirname(buildDir));
|
||||
late final platformDill = () {
|
||||
final possiblePaths = [
|
||||
// No cross compilation.
|
||||
path.join(buildDir, 'vm_platform_strong.dill'),
|
||||
path.join(buildDir, 'vm_platform.dill'),
|
||||
// ${MODE}SIMARM_X64 for X64->SIMARM cross compilation.
|
||||
path.join('${buildDir}_X64', 'vm_platform_strong.dill'),
|
||||
path.join('${buildDir}_X64', 'vm_platform.dill'),
|
||||
];
|
||||
for (final path in possiblePaths) {
|
||||
if (File(path).existsSync()) {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
throw 'Could not find vm_platform_strong.dill for build directory $buildDir';
|
||||
throw 'Could not find vm_platform.dill for build directory $buildDir';
|
||||
}();
|
||||
final genKernel = path.join(
|
||||
sdkDir,
|
||||
|
||||
@@ -185,7 +185,7 @@ test(List<String> Function(String) createDartCommand, int taskIndex) async {
|
||||
[
|
||||
"out/ReleaseX64/dart",
|
||||
"pkg/vm/bin/gen_kernel.dart",
|
||||
"--platform=$buildDir/vm_platform_strong.dill",
|
||||
"--platform=$buildDir/vm_platform.dill",
|
||||
"--aot",
|
||||
"--output=out/dartfuzz/$taskIndex.dill",
|
||||
dartScript,
|
||||
|
||||
+3
-3
@@ -287,13 +287,13 @@ template("gen_vm_platform") {
|
||||
gen_vm_platform("vm_platform") {
|
||||
add_implicit_vm_platform_dependency = false
|
||||
exclude_source = false
|
||||
output_postfix = "_strong"
|
||||
output_postfix = ""
|
||||
}
|
||||
|
||||
gen_vm_platform("vm_platform_product") {
|
||||
add_implicit_vm_platform_dependency = false
|
||||
exclude_source = false
|
||||
output_postfix = "_strong_product"
|
||||
output_postfix = "_product"
|
||||
|
||||
# In Debug mode we use debug binaries for dart2native.
|
||||
# (see also the "dart_product_config" config)
|
||||
@@ -303,7 +303,7 @@ gen_vm_platform("vm_platform_product") {
|
||||
gen_vm_platform("vm_platform_stripped") {
|
||||
add_implicit_vm_platform_dependency = false
|
||||
exclude_source = true
|
||||
output_postfix = "_strong_stripped"
|
||||
output_postfix = "_stripped"
|
||||
}
|
||||
|
||||
group("kernel_platform_files") {
|
||||
|
||||
@@ -28,8 +28,8 @@ using dart::bin::Builtin;
|
||||
using dart::bin::DartUtils;
|
||||
|
||||
extern "C" {
|
||||
extern const uint8_t kPlatformStrongDill[];
|
||||
extern intptr_t kPlatformStrongDillSize;
|
||||
extern const uint8_t kPlatformDill[];
|
||||
extern intptr_t kPlatformDillSize;
|
||||
}
|
||||
|
||||
namespace dart {
|
||||
@@ -37,8 +37,8 @@ namespace dart {
|
||||
DECLARE_FLAG(bool, gc_during_reload);
|
||||
DECLARE_FLAG(bool, force_evacuation);
|
||||
|
||||
const uint8_t* platform_strong_dill = kPlatformStrongDill;
|
||||
const intptr_t platform_strong_dill_size = kPlatformStrongDillSize;
|
||||
const uint8_t* platform_dill = kPlatformDill;
|
||||
const intptr_t platform_dill_size = kPlatformDillSize;
|
||||
|
||||
const uint8_t* TesterState::vm_snapshot_data = nullptr;
|
||||
Dart_IsolateGroupCreateCallback TesterState::create_callback = nullptr;
|
||||
@@ -328,8 +328,8 @@ char* TestCase::CompileTestScriptWithDFE(const char* url,
|
||||
const char* multiroot_scheme) {
|
||||
Zone* zone = Thread::Current()->zone();
|
||||
Dart_KernelCompilationResult result = KernelIsolate::CompileToKernel(
|
||||
url, platform_strong_dill, platform_strong_dill_size, sourcefiles_count,
|
||||
sourcefiles, incrementally, /*for_snapshot=*/false,
|
||||
url, platform_dill, platform_dill_size, sourcefiles_count, sourcefiles,
|
||||
incrementally, /*for_snapshot=*/false,
|
||||
/*embed_sources=*/true, nullptr, multiroot_filepaths, multiroot_scheme);
|
||||
if (result.status == Dart_KernelCompilationStatus_Ok) {
|
||||
if (KernelIsolate::AcceptCompilation().status !=
|
||||
|
||||
@@ -247,8 +247,8 @@ extern const uint8_t* core_isolate_snapshot_data;
|
||||
extern const uint8_t* core_isolate_snapshot_instructions;
|
||||
} // namespace bin
|
||||
|
||||
extern const uint8_t* platform_strong_dill;
|
||||
extern const intptr_t platform_strong_dill_size;
|
||||
extern const uint8_t* platform_dill;
|
||||
extern const intptr_t platform_dill_size;
|
||||
|
||||
class TesterState : public AllStatic {
|
||||
public:
|
||||
|
||||
+18
-5
@@ -78,7 +78,7 @@ declare_args() {
|
||||
# ........dart2wasm_js_compatibility_platform.dill (if not on ia32)
|
||||
# ........ddc_outline.dill
|
||||
# ........ddc_platform.dill
|
||||
# ........vm_platform_strong.dill
|
||||
# ........vm_platform.dill
|
||||
# ........js_dev_runtime/
|
||||
# ........js_runtime/
|
||||
# ........js_shared/
|
||||
@@ -417,11 +417,11 @@ if (_has_dot_sym) {
|
||||
}
|
||||
}
|
||||
|
||||
copy("copy_vm_platform_strong_product") {
|
||||
copy("copy_vm_platform_product") {
|
||||
visibility = [ ":group_dart2native" ]
|
||||
deps = [ "../runtime/vm:vm_platform_product" ]
|
||||
src_dir = get_label_info("../runtime/vm:vm_platform_product", "root_out_dir")
|
||||
sources = [ "$src_dir/vm_platform_strong_product.dill" ]
|
||||
sources = [ "$src_dir/vm_platform_product.dill" ]
|
||||
outputs =
|
||||
[ "$root_out_dir/$dart_sdk_output/lib/_internal/{{source_file_part}}" ]
|
||||
}
|
||||
@@ -439,7 +439,7 @@ group("group_dart2native") {
|
||||
":copy_dart_aotruntime",
|
||||
":copy_gen_kernel_snapshot",
|
||||
":copy_gen_snapshot",
|
||||
":copy_vm_platform_strong_product",
|
||||
":copy_vm_platform_product",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -552,11 +552,23 @@ copy("copy_vm_dill_files") {
|
||||
":copy_libraries",
|
||||
"../runtime/vm:kernel_platform_files",
|
||||
]
|
||||
sources = [ "$root_out_dir/vm_platform_strong.dill" ]
|
||||
sources = [ "$root_out_dir/vm_platform.dill" ]
|
||||
outputs =
|
||||
[ "$root_out_dir/$dart_sdk_output/lib/_internal/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
# Delete this after external packages are migrated to vm_platform.dill.
|
||||
copy("copy_vm_strong_dill_files") {
|
||||
visibility = [ ":create_common_sdk" ]
|
||||
deps = [
|
||||
":copy_libraries",
|
||||
"../runtime/vm:kernel_platform_files",
|
||||
]
|
||||
sources = [ "$root_out_dir/vm_platform.dill" ]
|
||||
outputs =
|
||||
[ "$root_out_dir/$dart_sdk_output/lib/_internal/vm_platform_strong.dill" ]
|
||||
}
|
||||
|
||||
copy("copy_dart2js_dill_files") {
|
||||
visibility = [ ":create_full_sdk" ]
|
||||
deps = [
|
||||
@@ -813,6 +825,7 @@ group("create_common_sdk") {
|
||||
":copy_readme",
|
||||
":copy_sdk_packages_yaml",
|
||||
":copy_vm_dill_files",
|
||||
":copy_vm_strong_dill_files",
|
||||
":write_dartdoc_options",
|
||||
":write_revision_file",
|
||||
":write_version_file",
|
||||
|
||||
@@ -64,7 +64,7 @@ final dartPrecompiledRuntimeUri = buildUriAbsolute.resolve(
|
||||
'dartaotruntime$standaloneExtensionExe',
|
||||
);
|
||||
|
||||
final platformDillUri = buildUriAbsolute.resolve('vm_platform_strong.dill');
|
||||
final platformDillUri = buildUriAbsolute.resolve('vm_platform.dill');
|
||||
|
||||
final packageConfigUri = sdkUriAbsolute.resolve(
|
||||
'.dart_tool/package_config.json',
|
||||
|
||||
@@ -12,7 +12,7 @@ final _batchSuffix = Platform.isWindows ? '.bat' : '';
|
||||
main() {
|
||||
final buildDir = path.dirname(Platform.executable);
|
||||
final sdkDir = path.dirname(path.dirname(buildDir));
|
||||
final platformDill = path.join(buildDir, 'vm_platform_strong.dill');
|
||||
final platformDill = path.join(buildDir, 'vm_platform.dill');
|
||||
final genKernel = path.join(
|
||||
sdkDir,
|
||||
'pkg',
|
||||
|
||||
@@ -81,9 +81,9 @@ $checkout/tools/sdks/dart-sdk/bin/dart \
|
||||
--single-root-scheme=org-dartlang-sdk \
|
||||
--single-root-base=$checkout/ \
|
||||
org-dartlang-sdk:///sdk/lib/libraries.json \
|
||||
vm_outline_strong.dill \
|
||||
vm_platform_strong.dill \
|
||||
vm_outline_strong.dill
|
||||
vm_outline.dill \
|
||||
vm_platform.dill \
|
||||
vm_outline.dill
|
||||
|
||||
$checkout/tools/sdks/dart-sdk/bin/dart \
|
||||
--packages=$checkout/.dart_tool/package_config.json \
|
||||
@@ -93,7 +93,7 @@ $checkout/tools/sdks/dart-sdk/bin/dart \
|
||||
--single-root-scheme=org-dartlang-sdk \
|
||||
--single-root-base=flutter/engine/src \
|
||||
org-dartlang-sdk:///flutter/lib/snapshot/libraries.json \
|
||||
vm_outline_strong.dill \
|
||||
vm_outline.dill \
|
||||
flutter_patched_sdk/platform_strong.dill \
|
||||
flutter_patched_sdk/outline_strong.dill
|
||||
|
||||
|
||||
@@ -3475,7 +3475,7 @@
|
||||
"script": "${build_root}/dart",
|
||||
"arguments": [
|
||||
"pkg/vm/bin/gen_kernel.dart",
|
||||
"--platform=${build_root}/vm_platform_strong.dill",
|
||||
"--platform=${build_root}/vm_platform.dill",
|
||||
"--no-aot",
|
||||
"-Dtest_runner.configuration=vm-linux-release-${arch}",
|
||||
"-o",
|
||||
@@ -3488,7 +3488,7 @@
|
||||
"script": "${build_root}/dart",
|
||||
"arguments": [
|
||||
"pkg/vm/bin/gen_kernel.dart",
|
||||
"--platform=${build_root}/vm_platform_strong.dill",
|
||||
"--platform=${build_root}/vm_platform.dill",
|
||||
"--aot",
|
||||
"-Dtest_runner.configuration=vm-aot-linux-release-${arch}",
|
||||
"-o",
|
||||
|
||||
@@ -145,8 +145,8 @@ for command; do
|
||||
out/ReleaseX64/dart2js_platform.dill \
|
||||
out/ReleaseX64/dart2wasm_outline.dill \
|
||||
out/ReleaseX64/dart2wasm_platform.dill \
|
||||
out/ReleaseX64/vm_outline_strong.dill \
|
||||
out/ReleaseX64/vm_platform_strong.dill \
|
||||
out/ReleaseX64/vm_outline.dill \
|
||||
out/ReleaseX64/vm_platform.dill \
|
||||
out/ReleaseX64/gen/kernel_service.dill \
|
||||
out/ReleaseX64/dart-sdk \
|
||||
out/ReleaseX64/dart \
|
||||
@@ -195,9 +195,9 @@ EOF
|
||||
out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --canary --mode=compile --compile-vm-options=--print-metrics --out out.js hello.dart
|
||||
out/ReleaseX64/dart-sdk/bin/dart pkg/analysis_server/benchmark/benchmarks.dart run --quick --repeat 1 analysis-server-cold
|
||||
echo '[{"name":"foo","edits":[["pkg/compiler/lib/src/dart2js.dart","2016","2017"],["pkg/compiler/lib/src/options.dart","2016","2017"]]}]' > appjit_train_edits.json
|
||||
out/ReleaseX64/dart --background-compilation=false --snapshot-kind=app-jit --snapshot=pkg/front_end/tool/incremental_perf.dart.appjit pkg/front_end/tool/incremental_perf.dart --target=vm --sdk-summary=out/ReleaseX64/vm_platform_strong.dill --sdk-library-specification=sdk/lib/libraries.json pkg/compiler/lib/src/dart2js.dart appjit_train_edits.json
|
||||
out/ReleaseX64/dart --background-compilation=false pkg/front_end/tool/incremental_perf.dart.appjit --target=vm --sdk-summary=out/ReleaseX64/vm_platform_strong.dill --sdk-library-specification=sdk/lib/libraries.json pkg/front_end/benchmarks/ikg/hello.dart pkg/front_end/benchmarks/ikg/hello.edits.json
|
||||
out/ReleaseX64/dart pkg/kernel/test/binary_bench.dart --golem AstFromBinaryLazy out/ReleaseX64/vm_platform_strong.dill
|
||||
out/ReleaseX64/dart --background-compilation=false --snapshot-kind=app-jit --snapshot=pkg/front_end/tool/incremental_perf.dart.appjit pkg/front_end/tool/incremental_perf.dart --target=vm --sdk-summary=out/ReleaseX64/vm_platform.dill --sdk-library-specification=sdk/lib/libraries.json pkg/compiler/lib/src/dart2js.dart appjit_train_edits.json
|
||||
out/ReleaseX64/dart --background-compilation=false pkg/front_end/tool/incremental_perf.dart.appjit --target=vm --sdk-summary=out/ReleaseX64/vm_platform.dill --sdk-library-specification=sdk/lib/libraries.json pkg/front_end/benchmarks/ikg/hello.dart pkg/front_end/benchmarks/ikg/hello.edits.json
|
||||
out/ReleaseX64/dart pkg/kernel/test/binary_bench.dart --golem AstFromBinaryLazy out/ReleaseX64/vm_platform.dill
|
||||
out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot InitialRSS
|
||||
out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot KernelServiceCompileAll
|
||||
out/ReleaseX64/run_vm_tests --dfe=out/ReleaseX64/kernel-service.dart.snapshot UseDartApi
|
||||
|
||||
@@ -59,7 +59,7 @@ template("aot_snapshot") {
|
||||
gen_kernel_kernel =
|
||||
get_label_info("$_dart_root/utils/gen_kernel:bootstrap_gen_kernel",
|
||||
"target_gen_dir") + "/bootstrap_gen_kernel.dill"
|
||||
platform_dill = "$root_out_dir/vm_platform_strong.dill"
|
||||
platform_dill = "$root_out_dir/vm_platform.dill"
|
||||
|
||||
inputs = extra_inputs + [
|
||||
gen_kernel_kernel,
|
||||
|
||||
@@ -131,7 +131,7 @@ template("application_snapshot") {
|
||||
gen_kernel_kernel =
|
||||
get_label_info("$_dart_root/utils/gen_kernel:bootstrap_gen_kernel",
|
||||
"target_gen_dir") + "/bootstrap_gen_kernel.dill"
|
||||
platform_dill = "$root_out_dir/vm_platform_strong.dill"
|
||||
platform_dill = "$root_out_dir/vm_platform.dill"
|
||||
|
||||
inputs = extra_inputs + [
|
||||
gen_kernel_kernel,
|
||||
|
||||
@@ -27,7 +27,7 @@ template("compile_platform") {
|
||||
# on vm_outline.dill. This is used to include the source code of Fasta itself
|
||||
# in the dependency file. Without this, a change to Fasta wouldn't cause the
|
||||
# platform dill files to be rebuilt. However, when building
|
||||
# vm_outline_strong.dill, we shouldn't list it as a dependency as this would
|
||||
# vm_outline.dill, we shouldn't list it as a dependency as this would
|
||||
# lead to cyclic dependencies.
|
||||
add_implicit_vm_platform_dependency = true
|
||||
if (defined(invoker.add_implicit_vm_platform_dependency)) {
|
||||
@@ -35,7 +35,7 @@ template("compile_platform") {
|
||||
invoker.add_implicit_vm_platform_dependency
|
||||
}
|
||||
|
||||
outline = "vm_outline_strong.dill"
|
||||
outline = "vm_outline.dill"
|
||||
if (defined(invoker.outline)) {
|
||||
outline = invoker.outline
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ prebuilt_dart_action("bootstrap_gen_kernel") {
|
||||
"$_dart_root/runtime/vm:vm_platform",
|
||||
]
|
||||
gen_kernel_script = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
|
||||
platform_dill = "$root_out_dir/vm_platform_strong.dill"
|
||||
platform_dill = "$root_out_dir/vm_platform.dill"
|
||||
package_config = rebase_path("$_dart_root/.dart_tool/package_config.json")
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -59,7 +59,7 @@ application_snapshot("frontend_server") {
|
||||
training_args = [
|
||||
"--train",
|
||||
"--sdk-root=$sdk_root/",
|
||||
"--platform=$sdk_root/vm_platform_strong.dill",
|
||||
"--platform=$sdk_root/vm_platform.dill",
|
||||
rebase_path(main_dart),
|
||||
]
|
||||
output = "$root_out_dir/frontend_server.dart.snapshot"
|
||||
@@ -101,7 +101,7 @@ template("kernel_service_dill") {
|
||||
]
|
||||
inputs = [
|
||||
kernel_service_script,
|
||||
"$root_out_dir/vm_platform_strong.dill",
|
||||
"$root_out_dir/vm_platform.dill",
|
||||
]
|
||||
output = "$root_gen_dir/kernel_service" + invoker.target_name + ".dill"
|
||||
outputs = [ output ]
|
||||
@@ -124,8 +124,8 @@ template("kernel_service_dill") {
|
||||
# consuming/producing kernel.
|
||||
"-Dsdk_hash=$sdk_hash",
|
||||
"--packages=" + scheme + ":///.dart_tool/package_config.json",
|
||||
"--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill",
|
||||
root_build_dir),
|
||||
"--platform=" +
|
||||
rebase_path("$root_out_dir/vm_platform.dill", root_build_dir),
|
||||
"--filesystem-root=" + rebase_path("../../"),
|
||||
"--filesystem-scheme=" + scheme,
|
||||
"--no-aot",
|
||||
@@ -146,7 +146,7 @@ template("kernel_service_dill") {
|
||||
inputs = [
|
||||
gen_kernel_script,
|
||||
kernel_service_script,
|
||||
"$root_out_dir/vm_platform_strong.dill",
|
||||
"$root_out_dir/vm_platform.dill",
|
||||
]
|
||||
output = "$root_gen_dir/kernel_service" + invoker.target_name + ".dill"
|
||||
outputs = [ output ]
|
||||
@@ -165,21 +165,20 @@ template("kernel_service_dill") {
|
||||
script = gen_kernel_script
|
||||
scheme = "org-dartlang-kernel-service"
|
||||
|
||||
args =
|
||||
invoker.extra_args + [
|
||||
# Ensure the compiled kernel-service will use this SDK hash when
|
||||
# consuming/producing kernel.
|
||||
"-Dsdk_hash=$sdk_hash",
|
||||
args = invoker.extra_args + [
|
||||
# Ensure the compiled kernel-service will use this SDK hash when
|
||||
# consuming/producing kernel.
|
||||
"-Dsdk_hash=$sdk_hash",
|
||||
|
||||
"--packages=" + scheme + ":///.dart_tool/package_config.json",
|
||||
"--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill",
|
||||
root_build_dir),
|
||||
"--filesystem-root=" + rebase_path("../../"),
|
||||
"--filesystem-scheme=" + scheme,
|
||||
"--no-aot",
|
||||
"--no-embed-sources",
|
||||
"--output=" + rebase_path(output, root_build_dir),
|
||||
]
|
||||
"--packages=" + scheme + ":///.dart_tool/package_config.json",
|
||||
"--platform=" + rebase_path("$root_out_dir/vm_platform.dill",
|
||||
root_build_dir),
|
||||
"--filesystem-root=" + rebase_path("../../"),
|
||||
"--filesystem-scheme=" + scheme,
|
||||
"--no-aot",
|
||||
"--no-embed-sources",
|
||||
"--output=" + rebase_path(output, root_build_dir),
|
||||
]
|
||||
args += [ scheme + ":///pkg/vm/bin/kernel_service.dart" ]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user