| Index: pkg/front_end/lib/src/fasta/compiler_command_line.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/compiler_command_line.dart b/pkg/front_end/lib/src/fasta/compiler_command_line.dart
|
| index 96e59bb3519e81d4b821c964cd1fb3cc2705a8db..16ed4dbe157698969b582fcb7cde56b026b6cf29 100644
|
| --- a/pkg/front_end/lib/src/fasta/compiler_command_line.dart
|
| +++ b/pkg/front_end/lib/src/fasta/compiler_command_line.dart
|
| @@ -17,6 +17,8 @@ const Map<String, dynamic> optionSpecification = const <String, dynamic>{
|
| "--packages": Uri,
|
| "--platform": Uri,
|
| "-o": Uri,
|
| + "--target": String,
|
| + "-t": String,
|
| };
|
|
|
| class CompilerCommandLine extends CommandLine {
|
| @@ -50,6 +52,9 @@ class CompilerCommandLine extends CommandLine {
|
| if (options.containsKey("-o") && options.containsKey("--output")) {
|
| return argumentError(usage, "Can't specify both '-o' and '--output'.");
|
| }
|
| + if (options.containsKey("-t") && options.containsKey("--target")) {
|
| + return argumentError(usage, "Can't specify both '-t' and '--target'.");
|
| + }
|
| if (programName == "compile_platform" && arguments.length != 3) {
|
| return argumentError(usage, "Expected three arguments.");
|
| } else if (arguments.isEmpty) {
|
| @@ -85,6 +90,10 @@ class CompilerCommandLine extends CommandLine {
|
|
|
| bool get strongMode => options.containsKey("--strong-mode");
|
|
|
| + String get target {
|
| + return options["-t"] ?? options["--target"] ?? "vm";
|
| + }
|
| +
|
| static dynamic withGlobalOptions(String programName, List<String> arguments,
|
| dynamic f(CompilerContext context)) {
|
| return CompilerContext.withGlobalOptions(
|
| @@ -165,6 +174,9 @@ Supported options:
|
| Read the SDK platform from <file>, which should be in Dill/Kernel IR format
|
| and contain the Dart SDK.
|
|
|
| + --target=none|vm|vmcc|vmreify|flutter
|
| + Specify the target configuration.
|
| +
|
| --verify
|
| Check that the generated output is free of various problems. This is mostly
|
| useful for developers of this compiler or Kernel transformations.
|
|
|