aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java
index a0aaa5a2ce..da7e446bee 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java
@@ -275,7 +275,17 @@ public class CcProtoAspect extends NativeAspectClass implements ConfiguredAspect
}
private void createProtoCompileAction(SupportData supportData, Collection<Artifact> outputs) {
- String genfilesPath = ruleContext.getConfiguration().getGenfilesFragment().getPathString();
+ String genfilesPath =
+ ruleContext
+ .getConfiguration()
+ .getGenfilesFragment()
+ .getRelative(
+ ruleContext
+ .getLabel()
+ .getPackageIdentifier()
+ .getRepository()
+ .getPathUnderExecRoot())
+ .getPathString();
ImmutableList.Builder<ToolchainInvocation> invocations = ImmutableList.builder();
invocations.add(