Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/dart2js.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/dart2js.dart (revision 21179) |
| +++ sdk/lib/_internal/compiler/implementation/dart2js.dart (working copy) |
| @@ -20,6 +20,17 @@ |
| const String LIBRARY_ROOT = '../../../../..'; |
| const String OUTPUT_LANGUAGE_DART = 'Dart'; |
| +/** |
| + * A string to identify the revision or build. |
| + * |
| + * This ID is displayed if the compiler crashes and in verbose mode, and is |
| + * an aid in reproducing bug reports. |
| + * |
| + * The actual string is rewritten by a wrapper script when included in the sdk. |
| + */ |
| +String BUILD_ID = null; |
| + |
| + |
|
ahe
2013/04/10 14:50:08
Extra line.
|
| typedef void HandleOption(String option); |
| class OptionHandler { |
| @@ -87,6 +98,10 @@ |
| passThrough(String argument) => options.add(argument); |
| + if (BUILD_ID != null) { |
| + passThrough("--build-id=$BUILD_ID"); |
| + } |
| + |
| setLibraryRoot(String argument) { |
| libraryRoot = cwd.resolve(extractPath(argument)); |
| } |
| @@ -311,7 +326,7 @@ |
| sink = new CountingSink(controller); |
| return sink; |
| } |
| - |
| + |
|
ahe
2013/04/10 14:50:08
Extra space.
ricow1
2013/04/11 05:45:12
Done.
|
| api.compile(uri, libraryRoot, packageRoot, |
| inputProvider.readStringFromUri, handler, |
| options, outputProvider) |
| @@ -486,9 +501,9 @@ |
| fail(message); |
| } |
| -void main() { |
| +void mainWithErrorHandler(Options options) { |
| try { |
| - compilerMain(new Options()); |
| + compilerMain(options); |
| } catch (exception, trace) { |
| try { |
| print('Internal error: $exception'); |
| @@ -502,3 +517,8 @@ |
| } |
| } |
| } |
| + |
|
ahe
2013/04/10 14:50:08
Extra line.
ricow1
2013/04/11 05:45:12
Done.
|
| + |
| +void main() { |
| + mainWithErrorHandler(new Options()); |
| +} |