| 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 | 7 import 'dart:io' show |
| 8 exit; | 8 exit; |
| 9 | 9 |
| 10 import 'command_line.dart' show | 10 import 'command_line.dart' show |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 Uri get output { | 57 Uri get output { |
| 58 return options["-o"] ?? options["--output"] ?? defaultOutput; | 58 return options["-o"] ?? options["--output"] ?? defaultOutput; |
| 59 } | 59 } |
| 60 | 60 |
| 61 Uri get defaultOutput => Uri.base.resolve("${arguments.first}.dill"); | 61 Uri get defaultOutput => Uri.base.resolve("${arguments.first}.dill"); |
| 62 | 62 |
| 63 Uri get platform { | 63 Uri get platform { |
| 64 return options["--platform"] ?? Uri.base.resolve("platform.dill"); | 64 return options.containsKey("--compile-sdk") |
| 65 ? null |
| 66 : options["--platform"] ?? Uri.base.resolve("platform.dill"); |
| 65 } | 67 } |
| 66 } | 68 } |
| 67 | 69 |
| 68 String computeUsage(String programName, bool verbose) { | 70 String computeUsage(String programName, bool verbose) { |
| 69 String basicUsage = "Usage: $programName [options] dartfile\n"; | 71 String basicUsage = "Usage: $programName [options] dartfile\n"; |
| 70 String summary; | 72 String summary; |
| 71 String options = (verbose ? allOptions : frequentOptions).trim(); | 73 String options = (verbose ? allOptions : frequentOptions).trim(); |
| 72 switch (programName) { | 74 switch (programName) { |
| 73 case "outline": | 75 case "outline": |
| 74 summary = | 76 summary = |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 --platform=<file> | 130 --platform=<file> |
| 129 Read the SDK platform from <file>, which should be in Dill/Kernel IR format | 131 Read the SDK platform from <file>, which should be in Dill/Kernel IR format |
| 130 and contain the Dart SDK. | 132 and contain the Dart SDK. |
| 131 | 133 |
| 132 --verify | 134 --verify |
| 133 Check that the generated output is free of various problems. This is mostly | 135 Check that the generated output is free of various problems. This is mostly |
| 134 useful for developers of this compiler or Kernel transformations. | 136 useful for developers of this compiler or Kernel transformations. |
| 135 | 137 |
| 136 --dump-ir | 138 --dump-ir |
| 137 Print compiled libraries in Kernel source notation. | 139 Print compiled libraries in Kernel source notation. |
| 140 |
| 141 --compile-sdk |
| 142 Compile the SDK from scratch instead of reading it from 'platform.dill'. |
| 138 """; | 143 """; |
| OLD | NEW |