mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:22:12 +00:00
[fasta] Commandline option to leave environment constants unevaluated.
Also, outdated description of -D option corrected. Change-Id: Ie1dc011adc3ce2f5293826c96f22700a6528c9a7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96880 Reviewed-by: Peter von der Ahé <ahe@google.com> Commit-Queue: Aske Simon Christensen <askesc@google.com>
This commit is contained in:
parent
10a8663e74
commit
dbea5c6884
|
@ -3329,7 +3329,10 @@ const MessageCode messageFastaUsageLong =
|
|||
|
||||
-Dname
|
||||
-Dname=value
|
||||
Ignored for now.
|
||||
Define an environment variable in the compile-time environment.
|
||||
|
||||
--no-defines
|
||||
Ignore all -D options and leave environment constants unevaluated.
|
||||
|
||||
--
|
||||
Stop option parsing, the rest of the command line is assumed to be
|
||||
|
|
|
@ -1538,7 +1538,10 @@ FastaUsageLong:
|
|||
|
||||
-Dname
|
||||
-Dname=value
|
||||
Ignored for now.
|
||||
Define an environment variable in the compile-time environment.
|
||||
|
||||
--no-defines
|
||||
Ignore all -D options and leave environment constants unevaluated.
|
||||
|
||||
--
|
||||
Stop option parsing, the rest of the command line is assumed to be
|
||||
|
|
|
@ -251,6 +251,7 @@ const Map<String, dynamic> optionSpecification = const <String, dynamic>{
|
|||
"--legacy": "--legacy-mode",
|
||||
"--legacy-mode": false,
|
||||
"--libraries-json": Uri,
|
||||
"--no-defines": false,
|
||||
"--output": Uri,
|
||||
"--packages": Uri,
|
||||
"--platform": Uri,
|
||||
|
@ -310,6 +311,8 @@ ProcessedOptions analyzeCommandLine(
|
|||
"Valid targets are:\n ${targets.keys.join("\n ")}");
|
||||
}
|
||||
|
||||
final bool noDefines = options["--no-defines"];
|
||||
|
||||
final bool enableAsserts = options["--enable-asserts"];
|
||||
|
||||
final bool verify = options["--verify"];
|
||||
|
@ -385,7 +388,7 @@ ProcessedOptions analyzeCommandLine(
|
|||
..verify = verify
|
||||
..bytecode = bytecode
|
||||
..experimentalFlags = experimentalFlags
|
||||
..environmentDefines = parsedArguments.defines,
|
||||
..environmentDefines = noDefines ? null : parsedArguments.defines,
|
||||
inputs: <Uri>[Uri.parse(arguments[0])],
|
||||
output: resolveInputUri(arguments[3]));
|
||||
} else if (arguments.isEmpty) {
|
||||
|
@ -421,7 +424,7 @@ ProcessedOptions analyzeCommandLine(
|
|||
..verbose = verbose
|
||||
..verify = verify
|
||||
..experimentalFlags = experimentalFlags
|
||||
..environmentDefines = parsedArguments.defines;
|
||||
..environmentDefines = noDefines ? null : parsedArguments.defines;
|
||||
|
||||
// TODO(ahe): What about chase dependencies?
|
||||
|
||||
|
|
Loading…
Reference in a new issue