Disabling gcc flags for Windows build.

pull/13171/head
Nicolas "Pixel" Noble 6 years ago
parent a73ae43786
commit ce3ba4dcdc
  1. 100
      BUILD

100
BUILD

@ -42,6 +42,11 @@ config_setting(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
config_setting(
name = "windows",
constraint_values = ["@bazel_tools//platforms:windows"],
)
config_setting( config_setting(
name = "fuzz", name = "fuzz",
values = {"define": "fuzz=true"}, values = {"define": "fuzz=true"},
@ -68,7 +73,10 @@ cc_library(
"upb/encode.h", "upb/encode.h",
"upb/upb.h", "upb/upb.h",
], ],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
@ -84,7 +92,10 @@ cc_library(
"upb/generated_util.h", "upb/generated_util.h",
"upb/msg.h", "upb/msg.h",
], ],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
textual_hdrs = [ textual_hdrs = [
"upb/port_def.inc", "upb/port_def.inc",
"upb/port_undef.inc", "upb/port_undef.inc",
@ -109,7 +120,10 @@ cc_library(
"upb/def.h", "upb/def.h",
"upb/msgfactory.h", "upb/msgfactory.h",
], ],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":descriptor_upbproto", ":descriptor_upbproto",
@ -134,7 +148,10 @@ cc_library(
"upb/legacy_msg_reflection.c", "upb/legacy_msg_reflection.c",
], ],
hdrs = ["upb/legacy_msg_reflection.h"], hdrs = ["upb/legacy_msg_reflection.h"],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
deps = [ deps = [
":table", ":table",
":upb", ":upb",
@ -152,7 +169,10 @@ cc_library(
"upb/handlers.h", "upb/handlers.h",
"upb/sink.h", "upb/sink.h",
], ],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
deps = [ deps = [
":reflection", ":reflection",
":table", ":table",
@ -176,7 +196,10 @@ cc_library(
"upb/pb/encoder.h", "upb/pb/encoder.h",
"upb/pb/textprinter.h", "upb/pb/textprinter.h",
], ],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
deps = [ deps = [
":descriptor_upbproto", ":descriptor_upbproto",
":handlers", ":handlers",
@ -197,7 +220,10 @@ cc_library(
"upb/json/parser.h", "upb/json/parser.h",
"upb/json/printer.h", "upb/json/printer.h",
], ],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
deps = [ deps = [
":upb", ":upb",
":upb_pb", ":upb_pb",
@ -227,7 +253,10 @@ cc_library(
"upbc/message_layout.h", "upbc/message_layout.h",
], ],
hdrs = ["upbc/generator.h"], hdrs = ["upbc/generator.h"],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
deps = [ deps = [
"@absl//absl/base:core_headers", "@absl//absl/base:core_headers",
"@absl//absl/container:flat_hash_map", "@absl//absl/container:flat_hash_map",
@ -240,7 +269,10 @@ cc_library(
cc_binary( cc_binary(
name = "protoc-gen-upb", name = "protoc-gen-upb",
srcs = ["upbc/main.cc"], srcs = ["upbc/main.cc"],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":upbc_generator", ":upbc_generator",
@ -274,7 +306,10 @@ cc_library(
"tests/test_util.h", "tests/test_util.h",
"tests/upb_test.h", "tests/upb_test.h",
], ],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
deps = [ deps = [
":handlers", ":handlers",
":upb", ":upb",
@ -287,7 +322,10 @@ cc_test(
"tests/pb/test_varint.c", "tests/pb/test_varint.c",
"upb/pb/varint.int.h", "upb/pb/varint.int.h",
], ],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
deps = [ deps = [
":upb", ":upb",
":upb_pb", ":upb_pb",
@ -313,7 +351,10 @@ cc_test(
"tests/pb/test_decoder.cc", "tests/pb/test_decoder.cc",
"upb/pb/varint.int.h", "upb/pb/varint.int.h",
], ],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
deps = [ deps = [
":handlers", ":handlers",
":test_decoder_upbproto", ":test_decoder_upbproto",
@ -338,7 +379,10 @@ upb_proto_reflection_library(
cc_test( cc_test(
name = "test_cpp", name = "test_cpp",
srcs = ["tests/test_cpp.cc"], srcs = ["tests/test_cpp.cc"],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
deps = [ deps = [
":handlers", ":handlers",
":reflection", ":reflection",
@ -352,7 +396,10 @@ cc_test(
cc_test( cc_test(
name = "test_table", name = "test_table",
srcs = ["tests/test_table.cc"], srcs = ["tests/test_table.cc"],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
deps = [ deps = [
":table", ":table",
":upb", ":upb",
@ -365,7 +412,10 @@ cc_binary(
name = "file_descriptor_parsenew_fuzzer", name = "file_descriptor_parsenew_fuzzer",
testonly = 1, testonly = 1,
srcs = ["tests/file_descriptor_parsenew_fuzzer.cc"], srcs = ["tests/file_descriptor_parsenew_fuzzer.cc"],
copts = CPPOPTS + select({ copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}) + select({
"//conditions:default": [], "//conditions:default": [],
":fuzz": ["-fsanitize=fuzzer,address"], ":fuzz": ["-fsanitize=fuzzer,address"],
}), }),
@ -388,7 +438,10 @@ upb_proto_reflection_library(
cc_test( cc_test(
name = "test_encoder", name = "test_encoder",
srcs = ["tests/pb/test_encoder.cc"], srcs = ["tests/pb/test_encoder.cc"],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
deps = [ deps = [
":descriptor_upbproto", ":descriptor_upbproto",
":descriptor_upbreflection", ":descriptor_upbreflection",
@ -430,7 +483,10 @@ cc_test(
srcs = [ srcs = [
"tests/json/test_json.cc", "tests/json/test_json.cc",
], ],
copts = CPPOPTS, copts = select({
":windows": [],
"//conditions:default": CPPOPTS
}),
deps = [ deps = [
":test_json_upbproto", ":test_json_upbproto",
":test_json_upbprotoreflection", ":test_json_upbprotoreflection",
@ -458,7 +514,10 @@ cc_binary(
srcs = [ srcs = [
"tests/conformance_upb.c", "tests/conformance_upb.c",
], ],
copts = COPTS + ["-Ibazel-out/k8-fastbuild/bin"], copts = select({
":windows": [],
"//conditions:default": COPTS
}) + ["-Ibazel-out/k8-fastbuild/bin"],
deps = [ deps = [
":conformance_proto_upb", ":conformance_proto_upb",
":test_messages_proto3_proto_upb", ":test_messages_proto3_proto_upb",
@ -512,7 +571,10 @@ cc_library(
name = "amalgamation", name = "amalgamation",
srcs = ["upb.c"], srcs = ["upb.c"],
hdrs = ["upb.h"], hdrs = ["upb.h"],
copts = COPTS, copts = select({
":windows": [],
"//conditions:default": COPTS
}),
) )
# Lua libraries. ############################################################### # Lua libraries. ###############################################################

Loading…
Cancel
Save