Chromium Code Reviews| Index: tools/testing/dart/compiler_configuration.dart |
| diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart |
| index 47c29a107d0bf11bd116e11bd63078bb82cb6e92..70c1264d9c921beaa15159ab90589525b2341767 100644 |
| --- a/tools/testing/dart/compiler_configuration.dart |
| +++ b/tools/testing/dart/compiler_configuration.dart |
| @@ -214,11 +214,22 @@ class Dart2xCompilerConfiguration extends CompilerConfiguration { |
| arguments = new List.from(arguments); |
| arguments.add('--out=$outputFileName'); |
| + // We want all dart2js compilers to run the vm with the |
| + // --abort-on-assertion-errors flag. |
| + // We have allowed constant maps as environmentOverrides, |
| + // so we modify a new map. |
| + var newOverrides = {'DART_VM_OPTIONS': '--abort-on-assertion-errors'}; |
| + if (environmentOverrides != null) { |
| + newOverrides.addAll(environmentOverrides); |
| + if (environmentOverrides.containsKey('DART_VM_OPTIONS')) { |
| + newOverrides['DART_VM_OPTIONS'] += ' --abort-on-assertion-errors'; |
| + } |
| + } |
|
kustermann
2016/02/08 11:11:42
Does this also work when using dart2js in batch mo
Bill Hesse
2016/02/08 11:16:09
Yes it does. That is how I found this function -
|
| return commandBuilder.getCompilationCommand( |
| moniker, outputFileName, !useSdk, |
| bootstrapDependencies(buildDir), |
| computeCompilerPath(buildDir), |
| - arguments, environmentOverrides); |
| + arguments, newOverrides); |
| } |
| List<Uri> bootstrapDependencies(String buildDir) { |