Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(922)

Unified Diff: pkg/front_end/lib/src/fasta/compiler_command_line.dart

Issue 2929783002: Add --sdk option. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698