aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoAspect.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibrary.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java7
3 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoAspect.java
index 07f432dbf7..4b9143e8fe 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoAspect.java
@@ -83,7 +83,8 @@ public class ObjcProtoAspect extends NativeAspectClass implements ConfiguredAspe
// If this target does not provide filters but specifies direct proto_library dependencies,
// generate a filter file only for those proto files.
if (Iterables.isEmpty(portableProtoFilters) && !Iterables.isEmpty(protoProviders)) {
- Artifact generatedFilter = ProtobufSupport.getGeneratedPortableFilter(ruleContext);
+ Artifact generatedFilter =
+ ProtobufSupport.getGeneratedPortableFilter(ruleContext, ruleContext.getConfiguration());
ProtobufSupport.registerPortableFilterGenerationAction(
ruleContext,
generatedFilter,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibrary.java
index f2d460e5ec..100d918ddf 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibrary.java
@@ -95,7 +95,8 @@ public class ObjcProtoLibrary implements RuleConfiguredTargetFactory {
if (attributes.hasPortableProtoFilters()) {
portableProtoFilters.addAll(attributes.getPortableProtoFilters());
} else if (!Iterables.isEmpty(protoProviders)) {
- Artifact generatedFilter = ProtobufSupport.getGeneratedPortableFilter(ruleContext);
+ Artifact generatedFilter = ProtobufSupport.getGeneratedPortableFilter(ruleContext,
+ ruleContext.getConfiguration());
ProtobufSupport.registerPortableFilterGenerationAction(
ruleContext,
generatedFilter,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
index 3a9af858c9..344c3a853f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ProtobufSupport.java
@@ -523,7 +523,7 @@ final class ProtobufSupport {
return ruleContext.getUniqueDirectoryArtifact(
"_protos",
"_proto_input_files" + suffix,
- ruleContext.getConfiguration().getGenfilesDirectory());
+ buildConfiguration.getGenfilesDirectory());
}
private String getProtoInputsFileContents(Iterable<Artifact> outputProtos) {
@@ -607,11 +607,12 @@ final class ProtobufSupport {
/**
* Returns a target specific generated artifact that represents a portable filter file.
*/
- public static Artifact getGeneratedPortableFilter(RuleContext ruleContext) {
+ public static Artifact getGeneratedPortableFilter(RuleContext ruleContext,
+ BuildConfiguration buildConfiguration) {
return ruleContext.getUniqueDirectoryArtifact(
"_proto_filters",
"generated_filter_file.pbascii",
- ruleContext.getConfiguration().getGenfilesDirectory());
+ buildConfiguration.getGenfilesDirectory());
}
/**