aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Carmi Grushko <carmi@google.com>2017-02-17 06:49:40 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2017-02-17 14:55:06 +0000
commit0fd73d6e3602003ae0e7e9ce6a25b27d73e30076 (patch)
tree0547ba510e475322ee512255a8d471ca5ad07fd0 /src/main
parent8153cb80f4a4424640e694cb6ed4792dcc193171 (diff)
--proto_compiler points at @com_google_protobuf//:protoc
This allows proto_library to be used out of the box by adding a repository entry that points to the protobuf distro in one's WORKSPACE file. -- PiperOrigin-RevId: 147808147 MOS_MIGRATED_REVID=147808147
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java
index 77145fef11..9474c9401f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java
@@ -39,7 +39,7 @@ public final class BazelProtoLibraryRule implements RuleDefinition {
private static final Attribute.LateBoundLabel<BuildConfiguration> PROTO_COMPILER =
new Attribute.LateBoundLabel<BuildConfiguration>(
- "//third_party/protobuf:protoc", ProtoConfiguration.class) {
+ "@com_google_protobuf//:protoc", ProtoConfiguration.class) {
@Override
public Label resolve(Rule rule, AttributeMap attributes, BuildConfiguration configuration) {
Label label = configuration.getFragment(ProtoConfiguration.class).protoCompiler();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
index f2d6b80375..46be0f8345 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
@@ -65,8 +65,8 @@ public class ProtoConfiguration extends Fragment {
@Option(
name = "proto_compiler",
- defaultValue = "null",
- category = "version",
+ defaultValue = "@com_google_protobuf//:protoc",
+ category = "flags",
converter = BuildConfiguration.LabelConverter.class,
help = "The label of the proto-compiler."
)