Index: pkg/front_end/lib/kernel_generator.dart |
diff --git a/pkg/front_end/lib/kernel_generator.dart b/pkg/front_end/lib/kernel_generator.dart |
index eec59026300a31c26820e2466f6114eaa1247ada..248d13d447de9e5ec40a29f6af52f7b16fd4db33 100644 |
--- a/pkg/front_end/lib/kernel_generator.dart |
+++ b/pkg/front_end/lib/kernel_generator.dart |
@@ -13,6 +13,7 @@ import 'src/fasta/dill/dill_target.dart' show DillTarget; |
import 'src/fasta/errors.dart' show InputError; |
import 'src/fasta/kernel/kernel_target.dart' show KernelTarget; |
import 'package:kernel/kernel.dart' show Program; |
+import 'package:kernel/target/targets.dart' show TargetFlags; |
import 'src/fasta/ticker.dart' show Ticker; |
import 'src/fasta/translate_uri.dart' show TranslateUri; |
import 'src/simple_error.dart'; |
@@ -52,15 +53,16 @@ Future<Program> kernelForProgram(Uri source, CompilerOptions options) async { |
try { |
TranslateUri uriTranslator = await pOptions.getUriTranslator(); |
- var dillTarget = |
- new DillTarget(new Ticker(isVerbose: false), uriTranslator, "vm"); |
+ var dillTarget = new DillTarget( |
+ new Ticker(isVerbose: false), uriTranslator, "vm_fasta", |
+ flags: new TargetFlags(strongMode: options.strongMode)); |
var summary = await pOptions.sdkSummaryProgram; |
if (summary != null) { |
dillTarget.loader.appendLibraries(summary); |
} |
- var kernelTarget = new KernelTarget( |
- options.fileSystem, dillTarget, uriTranslator, options.strongMode); |
+ var kernelTarget = |
+ new KernelTarget(options.fileSystem, dillTarget, uriTranslator); |
kernelTarget.read(source); |
await dillTarget.buildOutlines(); |
@@ -148,8 +150,9 @@ Future<Program> kernelForBuildUnit( |
try { |
TranslateUri uriTranslator = await pOptions.getUriTranslator(); |
- var dillTarget = |
- new DillTarget(new Ticker(isVerbose: false), uriTranslator, "vm"); |
+ var dillTarget = new DillTarget( |
+ new Ticker(isVerbose: false), uriTranslator, "vm_fasta", |
+ flags: new TargetFlags(strongMode: options.strongMode)); |
var summary = await pOptions.sdkSummaryProgram; |
if (summary != null) { |
dillTarget.loader.appendLibraries(summary); |
@@ -164,8 +167,8 @@ Future<Program> kernelForBuildUnit( |
await dillTarget.buildOutlines(); |
- var kernelTarget = new KernelTarget( |
- options.fileSystem, dillTarget, uriTranslator, options.strongMode); |
+ var kernelTarget = |
+ new KernelTarget(options.fileSystem, dillTarget, uriTranslator); |
sources.forEach(kernelTarget.read); |
await kernelTarget.buildOutlines(); |