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