| Index: tools/testing/dart/compiler_configuration.dart
|
| diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
|
| index 83fcfbe20143d7f50f496363ca147276868e236a..e901344c3edf082133351f3a4da9e50112c58e62 100644
|
| --- a/tools/testing/dart/compiler_configuration.dart
|
| +++ b/tools/testing/dart/compiler_configuration.dart
|
| @@ -64,12 +64,8 @@ abstract class CompilerConfiguration {
|
| bool useNoopt = configuration['noopt'];
|
|
|
| switch (compiler) {
|
| - case 'dartanalyzer':
|
| - return new AnalyzerCompilerConfiguration(
|
| - 'dartanalyzer', isDebug: isDebug, isChecked: isChecked,
|
| - isHostChecked: isHostChecked, useSdk: useSdk);
|
| case 'dart2analyzer':
|
| - return new DartBasedAnalyzerCompilerConfiguration(
|
| + return new AnalyzerCompilerConfiguration(
|
| isDebug: isDebug, isChecked: isChecked,
|
| isHostChecked: isHostChecked, useSdk: useSdk);
|
| case 'dart2js':
|
| @@ -298,12 +294,8 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
|
| }
|
| }
|
|
|
| -/// Common configuration for analyzer-based tools, such as, dartanalyzer.
|
| class AnalyzerCompilerConfiguration extends CompilerConfiguration {
|
| - final String moniker;
|
| -
|
| AnalyzerCompilerConfiguration(
|
| - this.moniker,
|
| {bool isDebug,
|
| bool isChecked,
|
| bool isHostChecked,
|
| @@ -317,8 +309,21 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
|
| }
|
|
|
| String computeCompilerPath(String buildDir) {
|
| + var prefix = 'sdk/bin';
|
| String suffix = executableScriptSuffix;
|
| - return 'sdk/bin/dartanalyzer_java$suffix';
|
| + if (isHostChecked) {
|
| + if (useSdk) {
|
| + throw "--host-checked and --use-sdk cannot be used together";
|
| + }
|
| + // The script dartanalyzer_developer is not included in the
|
| + // shipped SDK, that is the script is not installed in
|
| + // "$buildDir/dart-sdk/bin/"
|
| + return '$prefix/dartanalyzer_developer$suffix';
|
| + }
|
| + if (useSdk) {
|
| + prefix = '$buildDir/dart-sdk/bin';
|
| + }
|
| + return '$prefix/dartanalyzer$suffix';
|
| }
|
|
|
| CommandArtifact computeCompilationArtifact(
|
| @@ -334,9 +339,9 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
|
| return new CommandArtifact(
|
| <Command>[
|
| commandBuilder.getAnalysisCommand(
|
| - moniker, computeCompilerPath(buildDir), arguments,
|
| + 'dart2analyzer', computeCompilerPath(buildDir), arguments,
|
| environmentOverrides,
|
| - flavor: moniker)],
|
| + flavor: 'dart2analyzer')],
|
| null, null); // Since this is not a real compilation, no artifacts are
|
| // produced.
|
| }
|
| @@ -352,33 +357,3 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
|
| return <String>[];
|
| }
|
| }
|
| -
|
| -class DartBasedAnalyzerCompilerConfiguration
|
| - extends AnalyzerCompilerConfiguration {
|
| - DartBasedAnalyzerCompilerConfiguration({
|
| - bool isDebug,
|
| - bool isChecked,
|
| - bool isHostChecked,
|
| - bool useSdk})
|
| - : super(
|
| - 'dart2analyzer', isDebug: isDebug, isChecked: isChecked,
|
| - isHostChecked: isHostChecked, useSdk: useSdk);
|
| -
|
| - String computeCompilerPath(String buildDir) {
|
| - var prefix = 'sdk/bin';
|
| - String suffix = executableScriptSuffix;
|
| - if (isHostChecked) {
|
| - if (useSdk) {
|
| - throw "--host-checked and --use-sdk cannot be used together";
|
| - }
|
| - // The script dartanalyzer_developer is not included in the
|
| - // shipped SDK, that is the script is not installed in
|
| - // "$buildDir/dart-sdk/bin/"
|
| - return '$prefix/dartanalyzer_developer$suffix';
|
| - }
|
| - if (useSdk) {
|
| - prefix = '$buildDir/dart-sdk/bin';
|
| - }
|
| - return '$prefix/dartanalyzer$suffix';
|
| - }
|
| -}
|
|
|