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 1c415a1229dba2d5ac6d45065fdf05d965a0bb7b..9092992aed6c0dd001387282a70139968ba4c405 100644 |
--- a/pkg/front_end/lib/src/fasta/compiler_command_line.dart |
+++ b/pkg/front_end/lib/src/fasta/compiler_command_line.dart |
@@ -14,9 +14,10 @@ const Map<String, dynamic> optionSpecification = const <String, dynamic>{ |
"--compile-sdk": Uri, |
"--fatal": ",", |
"--output": Uri, |
+ "-o": Uri, |
"--packages": Uri, |
"--platform": Uri, |
- "-o": Uri, |
+ "--sdk": Uri, |
"--target": String, |
"-t": String, |
}; |
@@ -55,6 +56,11 @@ class CompilerCommandLine extends CommandLine { |
if (options.containsKey("-t") && options.containsKey("--target")) { |
return argumentError(usage, "Can't specify both '-t' and '--target'."); |
} |
+ if (options.containsKey("--compile-sdk") && |
+ options.containsKey("--platform")) { |
+ return argumentError( |
+ usage, "Can't specify both '--compile-sdk' and '--platform'."); |
+ } |
if (programName == "compile_platform" && arguments.length != 3) { |
return argumentError(usage, "Expected three arguments."); |
} else if (arguments.isEmpty) { |
@@ -76,7 +82,7 @@ class CompilerCommandLine extends CommandLine { |
Uri get packages => options["--packages"] ?? Uri.base.resolve(".packages"); |
- Uri get sdk => options["--compile-sdk"]; |
+ Uri get sdk => options["--sdk"] ?? options["--compile-sdk"]; |
Set<String> get fatal { |
return new Set<String>.from(options["--fatal"] ?? <String>[]); |
@@ -190,6 +196,10 @@ Supported options: |
--compile-sdk=<patched_sdk> |
Compile the SDK from scratch instead of reading it from 'platform.dill'. |
+ --sdk=<patched_sdk> |
+ Location of the SDK sources for use when compiling additional platform |
+ libraries. |
+ |
--fatal=errors |
--fatal=warnings |
--fatal=nits |