diff options
author | 2016-02-15 11:58:55 +0000 | |
---|---|---|
committer | 2016-02-15 13:43:47 +0000 | |
commit | 03ee2235e03237d498b536abfb3decc76bfb1030 (patch) | |
tree | 8b9a3bfeca3a3295669ffa555f73604c61234c36 /src/main | |
parent | 2bd5a3ce0e9751d7a1b7cc547197081544bdc29d (diff) |
Replace a few more uses of the Constants.TOOLS_REPOSITORY
--
MOS_MIGRATED_REVID=114680762
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java | 15 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/commands/FetchCommand.java | 2 |
2 files changed, 3 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java index 728b55c432..135d339239 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java @@ -29,7 +29,6 @@ import com.google.common.collect.ListMultimap; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.google.common.collect.MutableClassToInstanceMap; -import com.google.devtools.build.lib.Constants; import com.google.devtools.build.lib.actions.ArtifactFactory; import com.google.devtools.build.lib.actions.PackageRootResolver; import com.google.devtools.build.lib.actions.Root; @@ -847,16 +846,6 @@ public final class BuildConfiguration { ) public List<Label> targetEnvironments; - /** Converter for labels in the @bazel_tools repository. The @Options' defaultValues can't - * prepend TOOLS_REPOSITORY, unfortunately, because then the compiler thinks they're not - * constant. */ - public static class ToolsLabelConverter extends LabelConverter { - @Override - public Label convert(String input) throws OptionsParsingException { - return convertLabel(Constants.TOOLS_REPOSITORY + input); - } - } - @Option(name = "experimental_dynamic_configs", defaultValue = "false", category = "undocumented", @@ -1197,7 +1186,7 @@ public final class BuildConfiguration { this.fragments = ImmutableSortedMap.copyOf(fragmentsMap, lexicalFragmentSorter); this.skylarkVisibleFragments = buildIndexOfSkylarkVisibleFragments(); - + this.buildOptions = buildOptions; this.options = buildOptions.get(Options.class); @@ -2146,7 +2135,7 @@ public final class BuildConfiguration { public String getMakeVariableDefault(String var) { return globalMakeEnv.get(var); } - + /** * Returns a configuration fragment instances of the given class. */ diff --git a/src/main/java/com/google/devtools/build/lib/bazel/commands/FetchCommand.java b/src/main/java/com/google/devtools/build/lib/bazel/commands/FetchCommand.java index 6408276f99..96f9a1c8ed 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/commands/FetchCommand.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/commands/FetchCommand.java @@ -95,7 +95,7 @@ public final class FetchCommand implements BlazeCommand { ImmutableList.Builder<String> labelsToLoad = new ImmutableList.Builder<String>() .addAll(options.getResidue()); if (String.valueOf(javaOptions.javaLangtoolsJar).equals( - Constants.TOOLS_REPOSITORY + JavaOptions.DEFAULT_LANGTOOLS)) { + runtime.getRuleClassProvider().getToolsRepository() + JavaOptions.DEFAULT_LANGTOOLS)) { labelsToLoad.add(javaOptions.javaBase); } else { // TODO(kchodroow): Remove this when OS X isn't as hacky about finding the JVM. Our test |