diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java | 4 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/standalone/StandaloneContextConsumer.java | 17 |
2 files changed, 7 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java index 0bf594b8a3..73d3682393 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java @@ -23,10 +23,12 @@ import com.google.devtools.build.lib.actions.ActionContextProvider; import com.google.devtools.build.lib.actions.Executor.ActionContext; import com.google.devtools.build.lib.actions.SimpleActionContextProvider; import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider; +import com.google.devtools.build.lib.analysis.actions.FileWriteActionContext; import com.google.devtools.build.lib.query2.output.OutputFormatter; import com.google.devtools.build.lib.rules.android.WriteAdbArgsActionContext; import com.google.devtools.build.lib.rules.cpp.CppCompileActionContext; import com.google.devtools.build.lib.rules.cpp.CppLinkActionContext; +import com.google.devtools.build.lib.rules.cpp.IncludeScanningContext; import com.google.devtools.build.lib.rules.genquery.GenQuery; import com.google.devtools.build.lib.runtime.BlazeModule; import com.google.devtools.build.lib.runtime.BlazeRuntime; @@ -114,6 +116,8 @@ public class BazelRulesModule extends BlazeModule { return ImmutableMap.<Class<? extends ActionContext>, String>builder() .put(CppCompileActionContext.class, "") .put(CppLinkActionContext.class, "") + .put(IncludeScanningContext.class, "") + .put(FileWriteActionContext.class, "") .put(WriteAdbArgsActionContext.class, "") .build(); } diff --git a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneContextConsumer.java b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneContextConsumer.java index d581dd1fbf..b975a5e0ce 100644 --- a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneContextConsumer.java +++ b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneContextConsumer.java @@ -14,13 +14,9 @@ package com.google.devtools.build.lib.standalone; import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableMap.Builder; import com.google.devtools.build.lib.actions.ActionContextConsumer; import com.google.devtools.build.lib.actions.Executor.ActionContext; import com.google.devtools.build.lib.actions.SpawnActionContext; -import com.google.devtools.build.lib.analysis.actions.FileWriteActionContext; -import com.google.devtools.build.lib.rules.cpp.CppCompileActionContext; -import com.google.devtools.build.lib.rules.cpp.IncludeScanningContext; import java.util.Map; @@ -37,16 +33,9 @@ public class StandaloneContextConsumer implements ActionContextConsumer { @Override public Map<Class<? extends ActionContext>, String> getActionContexts() { - Builder<Class<? extends ActionContext>, String> actionContexts = new ImmutableMap.Builder<>(); - - actionContexts.put(SpawnActionContext.class, "standalone"); - - // C++. - actionContexts.put(IncludeScanningContext.class, ""); - actionContexts.put(CppCompileActionContext.class, ""); - actionContexts.put(FileWriteActionContext.class, ""); - - return actionContexts.build(); + return ImmutableMap.<Class<? extends ActionContext>, String>builder() + .put(SpawnActionContext.class, "standalone") + .build(); } } |