@@ -574,18 +574,14 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
574
574
List <String > arguments, Map <String , String > environmentOverrides) {
575
575
var commands = < Command > [];
576
576
577
- if (_isStrong) {
578
- commands.add (computeCompileToKernelCommand (
579
- tempDir, arguments, environmentOverrides));
580
- }
577
+ commands.add (computeCompileToKernelCommand (
578
+ tempDir, arguments, environmentOverrides));
581
579
582
580
commands.add (
583
- computeCompilationCommand (tempDir, arguments, environmentOverrides));
581
+ computeDartBootstrapCommand (tempDir, arguments, environmentOverrides));
584
582
585
- if (_isStrong) {
586
- commands.add (computeRemoveKernelFileCommand (
587
- tempDir, arguments, environmentOverrides));
588
- }
583
+ commands.add (computeRemoveKernelFileCommand (
584
+ tempDir, arguments, environmentOverrides));
589
585
590
586
if (! _configuration.useBlobs) {
591
587
commands.add (
@@ -604,14 +600,25 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
604
600
Map <String , String > environmentOverrides) {
605
601
final genKernel =
606
602
Platform .script.resolve ('../../../pkg/vm/tool/gen_kernel' ).toFilePath ();
603
+
604
+ final kernelBinariesFolder = _useSdk
605
+ ? '${_configuration .buildDirectory }/dart-sdk/lib/_internal'
606
+ : '${_configuration .buildDirectory }' ;
607
+
608
+ final vmPlatform = _isStrong
609
+ ? '$kernelBinariesFolder /vm_platform_strong.dill'
610
+ : '$kernelBinariesFolder /vm_platform.dill' ;
611
+
607
612
final dillFile = tempKernelFile (tempDir);
608
- var args = [
613
+ final args = [
609
614
'--aot' ,
610
- '--platform=${_configuration .buildDirectory }/vm_platform_strong.dill' ,
615
+ _isStrong ? '--strong-mode' : '--no-strong-mode' ,
616
+ '--platform=$vmPlatform ' ,
611
617
'-o' ,
612
618
dillFile,
613
619
];
614
620
args.add (arguments.where ((name) => name.endsWith ('.dart' )).single);
621
+
615
622
return Command .vmKernelCompilation (dillFile, true , bootstrapDependencies (),
616
623
genKernel, args, environmentOverrides);
617
624
}
@@ -631,7 +638,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
631
638
alwaysCompile: ! _useSdk);
632
639
}
633
640
634
- Command computeCompilationCommand (String tempDir, List <String > arguments,
641
+ Command computeDartBootstrapCommand (String tempDir, List <String > arguments,
635
642
Map <String , String > environmentOverrides) {
636
643
var buildDir = _configuration.buildDirectory;
637
644
String exec;
@@ -645,17 +652,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration {
645
652
exec = "$buildDir /dart_bootstrap" ;
646
653
}
647
654
648
- var args = < String > [];
649
- if (useDfe) {
650
- if (! _isStrong) {
651
- args.add ('--dfe=pkg/vm/bin/kernel_service.dart' );
652
- args.add ('--kernel-binaries=' +
653
- (_useSdk
654
- ? '${_configuration .buildDirectory }/dart-sdk/lib/_internal'
655
- : '${buildDir }' ));
656
- }
657
- }
658
-
655
+ final args = < String > [];
659
656
args.add ("--snapshot-kind=app-aot" );
660
657
if (_configuration.useBlobs) {
661
658
args.add ("--snapshot=$tempDir /out.aotsnapshot" );
0 commit comments