diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2019-03-27 15:32:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-27 15:32:05 -0700 |
commit | cf35baa1ad70f0dca734f93bcc2b54d8d059bcdd (patch) | |
tree | 3c9881fcceaba1dbb5f04fe01ddc5f2dc5c647d1 /BUILD | |
parent | 928ef7f2c02f18d9945dd750884dffbdebef1b98 (diff) |
Moved macros from upb.h to port_def.inc to avoid leaking them to users. (#160)
* Use port_def.inc to prevent macros from leaking to users.
* Added helpful comments to port_def.inc/port_undef.inc.
Diffstat (limited to 'BUILD')
-rw-r--r-- | BUILD | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -20,14 +20,20 @@ exports_files([ "build_defs", ]) -COPTS = [ +CPPOPTS = [ # copybara:strip_for_google3_begin - "-std=c89", - "-pedantic", + "-Werror", "-Wno-long-long", # copybara:strip_end ] +COPTS = CPPOPTS + [ + # copybara:strip_for_google3_begin + "-pedantic", + "-std=c89", + # copybara:strip_end +] + config_setting( name = "darwin", values = {"cpu": "darwin"}, @@ -93,6 +99,7 @@ cc_library( ], hdrs = ["upb/legacy_msg_reflection.h"], deps = [":upb"], + copts = COPTS, ) cc_library( @@ -178,6 +185,7 @@ cc_library( map_dep("@com_google_protobuf//:protobuf"), map_dep("@com_google_protobuf//:protoc_lib"), ], + copts = CPPOPTS, ) cc_binary( @@ -187,6 +195,7 @@ cc_binary( ":upbc_generator", map_dep("@com_google_protobuf//:protoc_lib"), ], + copts = CPPOPTS, ) # We strip the tests and remaining rules from google3 until the upb_proto_library() @@ -206,6 +215,7 @@ cc_library( "tests/test_util.h", "tests/upb_test.h", ], + copts = CPPOPTS, ) cc_test( @@ -215,6 +225,7 @@ cc_test( ":upb_pb", ":upb_test", ], + copts = COPTS, ) proto_library( @@ -238,6 +249,7 @@ cc_test( ":upb_pb", ":upb_test", ], + copts = CPPOPTS, ) cc_test( @@ -249,6 +261,7 @@ cc_test( ":upb_pb", ":upb_test", ], + copts = CPPOPTS, ) proto_library( @@ -273,6 +286,7 @@ cc_test( ":upb_pb", ":upb_test", ], + copts = CPPOPTS, ) cc_test( @@ -282,6 +296,7 @@ cc_test( ":upb", ":upb_test", ], + copts = CPPOPTS, ) proto_library( @@ -314,6 +329,7 @@ cc_test( ":upb_json", ":upb_test", ], + copts = CPPOPTS, ) upb_proto_library( @@ -330,7 +346,7 @@ cc_binary( srcs = [ "tests/conformance_upb.c", ], - copts = ["-Ibazel-out/k8-fastbuild/bin"], + copts = COPTS + ["-Ibazel-out/k8-fastbuild/bin"], deps = [ ":conformance_proto_upb", ":upb", |