| 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,22 @@
|
| 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 = 'build number could not be determined';
|
| +
|
| +/**
|
| + * Allows wrapping scripts to explicitly provide the options passed to the
|
| + * program instead of using the standard dart:io.
|
| + */
|
| +Options OPTIONS_OVERRIDE = null;
|
| +
|
| typedef void HandleOption(String option);
|
|
|
| class OptionHandler {
|
| @@ -311,7 +327,7 @@
|
| sink = new CountingSink(controller);
|
| return sink;
|
| }
|
| -
|
| +
|
| api.compile(uri, libraryRoot, packageRoot,
|
| inputProvider.readStringFromUri, handler,
|
| options, outputProvider)
|
| @@ -358,6 +374,7 @@
|
| void compilerMain(Options options) {
|
| var root = uriPathToNative("/$LIBRARY_ROOT");
|
| List<String> argv = ['--library-root=${options.script}$root'];
|
| + if (OPTIONS_OVERRIDE != null) options = OPTIONS_OVERRIDE;
|
| argv.addAll(options.arguments);
|
| compile(argv);
|
| }
|
|
|