OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 compiler_configuration; | 5 library compiler_configuration; |
6 | 6 |
7 import 'dart:io' show Platform; | 7 import 'dart:io' show Platform; |
8 | 8 |
9 import 'runtime_configuration.dart' show RuntimeConfiguration; | 9 import 'runtime_configuration.dart' show RuntimeConfiguration; |
10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration; | 10 import 'runtime_configuration.dart' show DartPrecompiledAdbRuntimeConfiguration; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 // TODO(ahe): Remove this. | 155 // TODO(ahe): Remove this. |
156 bool get isCsp => false; | 156 bool get isCsp => false; |
157 | 157 |
158 List<Uri> bootstrapDependencies(String buildDir) => const <Uri>[]; | 158 List<Uri> bootstrapDependencies(String buildDir) => const <Uri>[]; |
159 | 159 |
160 CommandArtifact computeCompilationArtifact( | 160 CommandArtifact computeCompilationArtifact( |
161 String buildDir, | 161 String buildDir, |
162 String tempDir, | 162 String tempDir, |
163 CommandBuilder commandBuilder, | 163 CommandBuilder commandBuilder, |
164 List arguments, | 164 List<String> arguments, |
165 Map<String, String> environmentOverrides) { | 165 Map<String, String> environmentOverrides) { |
166 return new CommandArtifact([], null, null); | 166 return new CommandArtifact([], null, null); |
167 } | 167 } |
168 | 168 |
169 List<String> computeCompilerArguments(vmOptions, sharedOptions, args) { | 169 List<String> computeCompilerArguments(vmOptions, sharedOptions, args) { |
170 return new List<String>()..addAll(sharedOptions)..addAll(args); | 170 return new List<String>()..addAll(sharedOptions)..addAll(args); |
171 } | 171 } |
172 | 172 |
173 List<String> computeRuntimeArguments( | 173 List<String> computeRuntimeArguments( |
174 RuntimeConfiguration runtimeConfiguration, | 174 RuntimeConfiguration runtimeConfiguration, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 @override | 250 @override |
251 String computeCompilerPath(String buildDir) { | 251 String computeCompilerPath(String buildDir) { |
252 return 'tools/dartk_wrappers/dartk$executableScriptSuffix'; | 252 return 'tools/dartk_wrappers/dartk$executableScriptSuffix'; |
253 } | 253 } |
254 | 254 |
255 CompilationCommand computeCompilationCommand( | 255 CompilationCommand computeCompilationCommand( |
256 String outputFileName, | 256 String outputFileName, |
257 String buildDir, | 257 String buildDir, |
258 CommandBuilder commandBuilder, | 258 CommandBuilder commandBuilder, |
259 List arguments, | 259 List<String> arguments, |
260 Map<String, String> environmentOverrides) { | 260 Map<String, String> environmentOverrides) { |
261 Iterable<String> extraArguments = [ | 261 Iterable<String> extraArguments = [ |
262 '--sdk', | 262 '--sdk', |
263 '$buildDir/patched_sdk', | 263 '$buildDir/patched_sdk', |
264 '--link', | 264 '--link', |
265 '--target=vm', | 265 '--target=vm', |
266 treeShake ? '--tree-shake' : null, | 266 treeShake ? '--tree-shake' : null, |
267 strong ? '--strong' : null, | 267 strong ? '--strong' : null, |
268 verify ? '--verify-ir' : null, | 268 verify ? '--verify-ir' : null, |
269 '--out', | 269 '--out', |
270 outputFileName | 270 outputFileName |
271 ].where((x) => x != null); | 271 ].where((x) => x != null); |
272 return commandBuilder.getKernelCompilationCommand( | 272 return commandBuilder.getKernelCompilationCommand( |
273 'dartk', | 273 'dartk', |
274 outputFileName, | 274 outputFileName, |
275 true, | 275 true, |
276 bootstrapDependencies(buildDir), | 276 bootstrapDependencies(buildDir), |
277 computeCompilerPath(buildDir), | 277 computeCompilerPath(buildDir), |
278 []..addAll(arguments)..addAll(extraArguments), | 278 <String>[]..addAll(arguments)..addAll(extraArguments), |
279 environmentOverrides); | 279 environmentOverrides); |
280 } | 280 } |
281 | 281 |
282 CommandArtifact computeCompilationArtifact( | 282 CommandArtifact computeCompilationArtifact( |
283 String buildDir, | 283 String buildDir, |
284 String tempDir, | 284 String tempDir, |
285 CommandBuilder commandBuilder, | 285 CommandBuilder commandBuilder, |
286 List arguments, | 286 List<String> arguments, |
287 Map<String, String> environmentOverrides) { | 287 Map<String, String> environmentOverrides) { |
288 return new CommandArtifact(<Command>[ | 288 return new CommandArtifact(<Command>[ |
289 this.computeCompilationCommand('$tempDir/out.dill', buildDir, | 289 this.computeCompilationCommand('$tempDir/out.dill', buildDir, |
290 CommandBuilder.instance, arguments, environmentOverrides) | 290 CommandBuilder.instance, arguments, environmentOverrides) |
291 ], '$tempDir/out.dill', 'application/dart'); | 291 ], '$tempDir/out.dill', 'application/dart'); |
292 } | 292 } |
293 | 293 |
294 List<String> computeRuntimeArguments( | 294 List<String> computeRuntimeArguments( |
295 RuntimeConfiguration runtimeConfiguration, | 295 RuntimeConfiguration runtimeConfiguration, |
296 String buildDir, | 296 String buildDir, |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 RuntimeConfiguration runtimeConfiguration, | 965 RuntimeConfiguration runtimeConfiguration, |
966 String buildDir, | 966 String buildDir, |
967 TestInformation info, | 967 TestInformation info, |
968 List<String> vmOptions, | 968 List<String> vmOptions, |
969 List<String> sharedOptions, | 969 List<String> sharedOptions, |
970 List<String> originalArguments, | 970 List<String> originalArguments, |
971 CommandArtifact artifact) { | 971 CommandArtifact artifact) { |
972 return <String>[]; | 972 return <String>[]; |
973 } | 973 } |
974 } | 974 } |
OLD | NEW |