diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRulesModule.java | 12 |
1 files changed, 11 insertions, 1 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 cfe6589127..c5effa0bed 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 @@ -19,9 +19,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.eventbus.Subscribe; import com.google.devtools.build.lib.actions.ActionContextConsumer; +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.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.genquery.GenQuery; @@ -110,7 +113,8 @@ public class BazelRulesModule extends BlazeModule { public Map<Class<? extends ActionContext>, String> getActionContexts() { return ImmutableMap.of( CppCompileActionContext.class, "", - CppLinkActionContext.class, ""); + CppLinkActionContext.class, "", + WriteAdbArgsActionContext.class, ""); } } @@ -131,6 +135,12 @@ public class BazelRulesModule extends BlazeModule { } @Override + public Iterable<ActionContextProvider> getActionContextProviders() { + return ImmutableList.<ActionContextProvider>of(new SimpleActionContextProvider( + new WriteAdbArgsActionContext(runtime.getClientEnv().get("HOME")))); + } + + @Override public Iterable<ActionContextConsumer> getActionContextConsumers() { return ImmutableList.<ActionContextConsumer>of(new BazelActionContextConsumer( optionsProvider.getOptions(BazelExecutionOptions.class))); |