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

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

Issue 2979713002: Add --set-exit-code-on-problem option. (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
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 3f3960695a5df626a35e86c7ba52a3c4b83c96f7..aa3e503d71da4d8d1e733dfea03bfec054bbbb6d 100644
--- a/pkg/front_end/lib/src/kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/kernel_generator_impl.dart
@@ -11,13 +11,14 @@ import 'dart:async';
import 'package:kernel/kernel.dart' show Program, CanonicalName;
import 'base/processed_options.dart';
-import 'fasta/dill/dill_target.dart' show DillTarget;
+import 'fasta/compiler_command_line.dart' show CompilerCommandLine;
+import 'fasta/compiler_context.dart' show CompilerContext;
import 'fasta/deprecated_problems.dart' show deprecated_InputError, reportCrash;
+import 'fasta/dill/dill_target.dart' show DillTarget;
import 'fasta/kernel/kernel_outline_shaker.dart';
import 'fasta/kernel/kernel_target.dart' show KernelTarget;
-import 'fasta/kernel/verifier.dart';
import 'fasta/kernel/utils.dart';
-import 'fasta/compiler_command_line.dart';
+import 'fasta/kernel/verifier.dart';
import 'fasta/translate_uri.dart' show TranslateUri;
/// Implementation for the `package:front_end/kernel_generator.dart` and
@@ -27,7 +28,7 @@ Future<CompilerResult> generateKernel(ProcessedOptions options,
bool buildProgram: true,
bool trimDependencies: false}) async {
// TODO(sigmund): Replace CompilerCommandLine and instead simply use a
- // CompilerContext that directly uses the ProcessedOptions throught the
+ // CompilerContext that directly uses the ProcessedOptions through the
// system.
String programName = "";
List<String> arguments = <String>[programName, "--target=none"];
@@ -37,6 +38,9 @@ Future<CompilerResult> generateKernel(ProcessedOptions options,
if (options.verbose) {
arguments.add("--verbose");
}
+ if (options.setExitCodeOnProblem) {
+ arguments.add("--set-exit-code-on-problem");
+ }
return await CompilerCommandLine.withGlobalOptions(programName, arguments,
(CompilerContext context) async {
context.options.options["--target"] = options.target;

Powered by Google App Engine
This is Rietveld 408576698