diff options
author | 2015-07-21 13:40:42 +0000 | |
---|---|---|
committer | 2015-07-21 15:13:38 -0400 | |
commit | 64884927e0b4149273e0e9ef58786c63373dc062 (patch) | |
tree | 01eb1c6c2d5e3c9f358096f8c6e0748badc8cfbb /src/main/java | |
parent | 4463b4ebd9f4a4d433da5026c25ca3d2342fb4b4 (diff) |
Remove some dead code that made Bazel croak on nontrivial Android builds.
--
MOS_MIGRATED_REVID=98730087
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java index 3533f227bc..a34cb55824 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java @@ -18,7 +18,6 @@ import static com.google.devtools.build.lib.analysis.config.BuildConfiguration.S import static com.google.devtools.build.lib.analysis.config.BuildConfiguration.StrictDepsMode.STRICT; import com.google.common.base.Optional; -import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.actions.Artifact; @@ -32,7 +31,6 @@ import com.google.devtools.build.lib.analysis.RuleConfiguredTargetBuilder; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.Runfiles; import com.google.devtools.build.lib.analysis.RunfilesProvider; -import com.google.devtools.build.lib.analysis.RunfilesSupport; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.analysis.actions.FileWriteAction; import com.google.devtools.build.lib.analysis.actions.SpawnAction; @@ -679,8 +677,6 @@ public class AndroidCommon { private void generateAndroidIdlActions(RuleContext ruleContext, Collection<Artifact> idls, AndroidIdlProvider transitiveIdlImportData, Map<Artifact, Artifact> translatedIdlSources) { - FilesToRunProvider toolRunner = - ruleContext.getExecutablePrerequisite("$android_tool_runner", Mode.HOST); AndroidSdkProvider sdk = AndroidSdkProvider.fromRuleContext(ruleContext); Set<Artifact> preprocessedIdls = new LinkedHashSet<>(); List<String> preprocessedArgs = new ArrayList<>(); @@ -704,7 +700,7 @@ public class AndroidCommon { preprocessedIdls.add(preprocessed); preprocessedArgs.add("-p" + preprocessed.getExecPathString()); - createAndroidIdlPreprocessAction(ruleContext, toolRunner, idl, preprocessed); + createAndroidIdlPreprocessAction(ruleContext, idl, preprocessed); } // aggregate all preprocessed aidl files @@ -714,17 +710,15 @@ public class AndroidCommon { ruleContext.getConfiguration().getMiddlemanDirectory()); for (Artifact idl : translatedIdlSources.keySet()) { - createAndroidIdlAction(ruleContext, toolRunner, idl, + createAndroidIdlAction(ruleContext, idl, transitiveIdlImportData.getTransitiveIdlImports(), preprocessedIdlsMiddleman, translatedIdlSources.get(idl), preprocessedArgs); } } private void createAndroidIdlPreprocessAction(RuleContext ruleContext, - FilesToRunProvider toolRunner, Artifact idl, Artifact preprocessed) { - RunfilesSupport toolRunnerRunfiles = toolRunner.getRunfilesSupport(); + Artifact idl, Artifact preprocessed) { AndroidSdkProvider sdk = AndroidSdkProvider.fromRuleContext(ruleContext); - Preconditions.checkState(toolRunnerRunfiles != null, toolRunner.getLabel()); ruleContext.registerAction(new SpawnAction.Builder() .setExecutable(sdk.getAidl()) // Note the below may be an overapproximation of the actual runfiles, due to "conditional @@ -742,12 +736,9 @@ public class AndroidCommon { } private void createAndroidIdlAction(RuleContext ruleContext, - FilesToRunProvider toolRunner, Artifact idl, Iterable<Artifact> idlImports, Artifact preprocessedIdls, Artifact output, List<String> preprocessedArgs) { - RunfilesSupport toolRunnerRunfiles = toolRunner.getRunfilesSupport(); AndroidSdkProvider sdk = AndroidSdkProvider.fromRuleContext(ruleContext); - Preconditions.checkState(toolRunnerRunfiles != null, toolRunner.getLabel()); ruleContext.registerAction(new SpawnAction.Builder() .setExecutable(sdk.getAidl()) .addInput(idl) |