diff options
author | Mike Lewis <lewis@squareup.com> | 2018-04-13 10:29:11 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-13 10:30:26 -0700 |
commit | 28daf76e8f86370b9276a3e248d4c2eddf275d44 (patch) | |
tree | 439c1394fdb77b7cafd32454d12fb0812e1669e5 /tools/j2objc | |
parent | d60bb5c4131ea7b389b8cef8faaa0983d191e583 (diff) |
Adding toolchain support for j2objc protos
Ran into an issue where it wasn't possible to add protos to blacklist for j2objc toolchain and was getting duplicate symbols for the descriptor protos.
This change should make it consistent with the other proto rules which use a toolchain. Was able to remove bespoke and uncustomizable proto blacklist for j2objc.
Closes #4064.
PiperOrigin-RevId: 192787964
Diffstat (limited to 'tools/j2objc')
-rw-r--r-- | tools/j2objc/BUILD | 10 | ||||
-rw-r--r-- | tools/j2objc/dummy.proto | 21 |
2 files changed, 7 insertions, 24 deletions
diff --git a/tools/j2objc/BUILD b/tools/j2objc/BUILD index b531e1fd83..351653a63c 100644 --- a/tools/j2objc/BUILD +++ b/tools/j2objc/BUILD @@ -23,7 +23,11 @@ filegroup( srcs = ["j2objc_header_map.py"], ) -filegroup( - name = "j2objc_proto_blacklist", - srcs = ["dummy.proto"], +proto_lang_toolchain( + name = "j2objc_proto_toolchain", + blacklisted_protos = [], + command_line = "--PLUGIN_j2objc_out=file_dir_mapping,generate_class_mappings:$(OUT)", + plugin = "//third_party/java/j2objc:proto_plugin", + runtime = "//third_party/java/j2objc:proto_runtime", + visibility = ["//visibility:public"], ) diff --git a/tools/j2objc/dummy.proto b/tools/j2objc/dummy.proto deleted file mode 100644 index 9d90b3dcdb..0000000000 --- a/tools/j2objc/dummy.proto +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2016 The Bazel Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto2"; - -package third_party.bazel.tools.j2objc; - -message Dummy { - optional string dummy = 1; -} |