| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library fasta.compiler_command_line; | 5 library fasta.compiler_command_line; |
| 6 | 6 |
| 7 import 'dart:io' show exit; | 7 import 'dart:io' show exit; |
| 8 | 8 |
| 9 import 'command_line.dart' show CommandLine, argumentError; | 9 import 'command_line.dart' show CommandLine, argumentError; |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 CompilerCommandLine(String programName, List<String> arguments) | 25 CompilerCommandLine(String programName, List<String> arguments) |
| 26 : programName = programName, | 26 : programName = programName, |
| 27 super(arguments, | 27 super(arguments, |
| 28 specification: optionSpecification, | 28 specification: optionSpecification, |
| 29 usage: computeUsage(programName, false)); | 29 usage: computeUsage(programName, false)); |
| 30 | 30 |
| 31 bool get verify => options.containsKey("--verify"); | 31 bool get verify => options.containsKey("--verify"); |
| 32 | 32 |
| 33 bool get dumpIr => options.containsKey("--dump-ir"); | 33 bool get dumpIr => options.containsKey("--dump-ir"); |
| 34 | 34 |
| 35 bool get includeSource => options.containsKey("--include-source"); |
| 36 |
| 35 bool get help { | 37 bool get help { |
| 36 return options.containsKey("--help") || | 38 return options.containsKey("--help") || |
| 37 options.containsKey("-h") || | 39 options.containsKey("-h") || |
| 38 options.containsKey("/h") || | 40 options.containsKey("/h") || |
| 39 options.containsKey("/?"); | 41 options.containsKey("/?"); |
| 40 } | 42 } |
| 41 | 43 |
| 42 void validate() { | 44 void validate() { |
| 43 if (help) { | 45 if (help) { |
| 44 print(computeUsage(programName, verbose)); | 46 print(computeUsage(programName, verbose)); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 Read the SDK platform from <file>, which should be in Dill/Kernel IR format | 162 Read the SDK platform from <file>, which should be in Dill/Kernel IR format |
| 161 and contain the Dart SDK. | 163 and contain the Dart SDK. |
| 162 | 164 |
| 163 --verify | 165 --verify |
| 164 Check that the generated output is free of various problems. This is mostly | 166 Check that the generated output is free of various problems. This is mostly |
| 165 useful for developers of this compiler or Kernel transformations. | 167 useful for developers of this compiler or Kernel transformations. |
| 166 | 168 |
| 167 --dump-ir | 169 --dump-ir |
| 168 Print compiled libraries in Kernel source notation. | 170 Print compiled libraries in Kernel source notation. |
| 169 | 171 |
| 172 --include-source |
| 173 Include source code in the dill file. Used for debugging. |
| 174 |
| 170 --compile-sdk=<patched_sdk> | 175 --compile-sdk=<patched_sdk> |
| 171 Compile the SDK from scratch instead of reading it from 'platform.dill'. | 176 Compile the SDK from scratch instead of reading it from 'platform.dill'. |
| 172 | 177 |
| 173 --fatal=errors | 178 --fatal=errors |
| 174 --fatal=warnings | 179 --fatal=warnings |
| 175 --fatal=nits | 180 --fatal=nits |
| 176 Makes messages of the given kinds fatal, that is, immediately stop the | 181 Makes messages of the given kinds fatal, that is, immediately stop the |
| 177 compiler with a non-zero exit-code. In --verbose mode, also display an | 182 compiler with a non-zero exit-code. In --verbose mode, also display an |
| 178 internal stack trace from the compiler. Multiple kinds can be separated by | 183 internal stack trace from the compiler. Multiple kinds can be separated by |
| 179 commas, for example, --fatal=errors,warnings. | 184 commas, for example, --fatal=errors,warnings. |
| 180 """; | 185 """; |
| OLD | NEW |