Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: pkg/front_end/lib/src/kernel_generator_impl.dart

Issue 2982443002: Correctly pass options to CompilerCommandLine.withGlobalOptions. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/kernel_generator_impl.dart
diff --git a/pkg/front_end/lib/src/kernel_generator_impl.dart b/pkg/front_end/lib/src/kernel_generator_impl.dart
index fca3fb1e35b08c639ed839a0d517d914ee55bb88..3f3960695a5df626a35e86c7ba52a3c4b83c96f7 100644
--- a/pkg/front_end/lib/src/kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/kernel_generator_impl.dart
@@ -29,11 +29,17 @@ Future<CompilerResult> generateKernel(ProcessedOptions options,
// TODO(sigmund): Replace CompilerCommandLine and instead simply use a
// CompilerContext that directly uses the ProcessedOptions throught the
// system.
- return await CompilerCommandLine.withGlobalOptions("", [""], (context) async {
- context.options.options['--target'] = options.target;
- context.options.options['--strong-mode'] = options.strongMode;
- context.options.options['--verbose'] = options.verbose;
-
+ String programName = "";
+ List<String> arguments = <String>[programName, "--target=none"];
+ if (options.strongMode) {
+ arguments.add("--strong-mode");
+ }
+ if (options.verbose) {
+ arguments.add("--verbose");
+ }
+ return await CompilerCommandLine.withGlobalOptions(programName, arguments,
+ (CompilerContext context) async {
+ context.options.options["--target"] = options.target;
return await generateKernelInternal(options,
buildSummary: buildSummary,
buildProgram: buildProgram,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698