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

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

Issue 2878383003: Fix command line args validation for platform compilation with fasta (Closed)
Patch Set: Created 3 years, 7 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 7788309d1c0e1e6e13308944709b0e9f35187375..ab6d6a47ebbeddd186d63d47e8bfb82dcb92b8cb 100644
--- a/pkg/front_end/lib/src/fasta/compiler_command_line.dart
+++ b/pkg/front_end/lib/src/fasta/compiler_command_line.dart
@@ -50,7 +50,9 @@ class CompilerCommandLine extends CommandLine {
if (options.containsKey("-o") && options.containsKey("--output")) {
return argumentError(usage, "Can't specify both '-o' and '--output'.");
}
- if (programName == "compile_platform" && arguments.length != 2) {
+ if (programName == "compile_platform" && arguments.length != 3) {
+ // The three expected arguments are: patched_sdk/lib path, full output
+ // path (usually "platform.dill"), and outline output path.
return argumentError(usage, "Expected two arguments.");
ahe 2017/05/15 11:02:01 Consider removing the comment and updating the err
Dmitry Stefantsov 2017/05/15 11:07:03 Right :) Thanks!
} else if (arguments.isEmpty) {
return argumentError(usage, "No Dart file specified.");
@@ -121,7 +123,8 @@ String computeUsage(String programName, bool verbose) {
case "compile_platform":
summary = "Compiles Dart SDK platform to the Dill/Kernel IR format.";
- basicUsage = "Usage: $programName [options] patched_sdk output\n";
+ basicUsage = "Usage: $programName [options] patched_sdk fullOutput "
+ "outlineOutput\n";
}
StringBuffer sb = new StringBuffer(basicUsage);
if (summary != null) {
« 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