diff options
author | elenairina <elenairina@google.com> | 2018-02-16 08:07:42 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-16 08:09:06 -0800 |
commit | 15a4362cabd1699f488e42377bde9b27ad8943d0 (patch) | |
tree | 49dadf4b06a9d2ae1967d62aa174e7464b03a28a /src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java | |
parent | 8d4f813031002ecb4cdab0d11159df8f9bc9eebb (diff) |
Add "proto_source_root" flag to proto_library.
Fixes #4544.
RELNOTES: Add "proto_source_root" flag to proto_library.
PiperOrigin-RevId: 185997723
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java index 639b07a032..a78fcd3e3f 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java @@ -359,7 +359,8 @@ public class ProtoCompileActionBuilder { NestedSet<Artifact> protosInDirectDeps, Artifact output, boolean allowServices, - NestedSet<Artifact> transitiveDescriptorSets) { + NestedSet<Artifact> transitiveDescriptorSets, + NestedSet<String> protoSourceRoots) { if (protosToCompile.isEmpty()) { ruleContext.registerAction( FileWriteAction.createEmptyWithInputs( @@ -374,6 +375,7 @@ public class ProtoCompileActionBuilder { protosToCompile, transitiveSources, protosInDirectDeps, + protoSourceRoots, ruleContext.getLabel(), ImmutableList.of(output), "Descriptor Set", @@ -420,6 +422,7 @@ public class ProtoCompileActionBuilder { Iterable<Artifact> protosToCompile, NestedSet<Artifact> transitiveSources, NestedSet<Artifact> protosInDirectDeps, + NestedSet<String> protoSourceRoots, Label ruleLabel, Iterable<Artifact> outputs, String flavorName, @@ -431,6 +434,7 @@ public class ProtoCompileActionBuilder { protosToCompile, transitiveSources, protosInDirectDeps, + protoSourceRoots, ruleLabel, outputs, flavorName, @@ -447,6 +451,7 @@ public class ProtoCompileActionBuilder { Iterable<Artifact> protosToCompile, NestedSet<Artifact> transitiveSources, @Nullable NestedSet<Artifact> protosInDirectDeps, + NestedSet<String> protoSourceRoots, Label ruleLabel, Iterable<Artifact> outputs, String flavorName, @@ -481,6 +486,7 @@ public class ProtoCompileActionBuilder { toolchainInvocations, protosToCompile, transitiveSources, + protoSourceRoots, areDepsStrict(ruleContext) ? protosInDirectDeps : null, ruleLabel, allowServices, @@ -517,6 +523,7 @@ public class ProtoCompileActionBuilder { List<ToolchainInvocation> toolchainInvocations, Iterable<Artifact> protosToCompile, NestedSet<Artifact> transitiveSources, + NestedSet<String> transitiveProtoPathFlags, @Nullable NestedSet<Artifact> protosInDirectDeps, Label ruleLabel, boolean allowServices, @@ -570,6 +577,8 @@ public class ProtoCompileActionBuilder { cmdLine.add("--disallow_services"); } + cmdLine.addAll(transitiveProtoPathFlags); + return cmdLine.build(); } |