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 | 7 import 'dart:io' show |
8 Platform; | 8 Platform; |
9 | 9 |
10 import 'runtime_configuration.dart' show | 10 import 'runtime_configuration.dart' show |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 extends AnalyzerCompilerConfiguration { | 385 extends AnalyzerCompilerConfiguration { |
386 DartBasedAnalyzerCompilerConfiguration({ | 386 DartBasedAnalyzerCompilerConfiguration({ |
387 bool isDebug, | 387 bool isDebug, |
388 bool isChecked, | 388 bool isChecked, |
389 bool isHostChecked, | 389 bool isHostChecked, |
390 bool useSdk}) | 390 bool useSdk}) |
391 : super( | 391 : super( |
392 'dart2analyzer', isDebug: isDebug, isChecked: isChecked, | 392 'dart2analyzer', isDebug: isDebug, isChecked: isChecked, |
393 isHostChecked: isHostChecked, useSdk: useSdk); | 393 isHostChecked: isHostChecked, useSdk: useSdk); |
394 | 394 |
395 String computeCompilerPath(String buildDir) => 'editor/tools/analyzer'; | 395 String computeCompilerPath(String buildDir) { |
| 396 var prefix = 'sdk/bin'; |
| 397 String suffix = executableScriptSuffix; |
| 398 if (isHostChecked) { |
| 399 if (useSdk) { |
| 400 throw "--host-checked and --use-sdk cannot be used together"; |
| 401 } |
| 402 // The script dartanalyzer_developer is not included in the |
| 403 // shipped SDK, that is the script is not installed in |
| 404 // "$buildDir/dart-sdk/bin/" |
| 405 // TODO(paulberry): the script dartanalyzer_developer currently |
| 406 // points to the wrong place (the Java-based analyzer). Once |
| 407 // this is fixed, we should run dartanalyzer_developer when in |
| 408 // isHostChecked mode. |
| 409 } |
| 410 if (useSdk) { |
| 411 prefix = '$buildDir/dart-sdk/bin'; |
| 412 } |
| 413 return '$prefix/dartanalyzer$suffix'; |
| 414 } |
396 } | 415 } |
OLD | NEW |