Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 6d9cd80

Browse files
authored
Use MSVC_FLAGS with MSVC. (#57)
GCC_FLAGS don't work (we get an error about /Wextra)
1 parent ebdb4db commit 6d9cd80

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

opencensus/BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ config_setting(
2121
},
2222
visibility = [":__subpackages__"],
2323
)
24+
25+
config_setting(
26+
name = "windows",
27+
values = {
28+
"cpu": "x64_windows",
29+
},
30+
visibility = [":__subpackages__"],
31+
)

opencensus/copts.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ load(
2727
"GCC_TEST_FLAGS",
2828
"LLVM_FLAGS",
2929
"LLVM_TEST_FLAGS",
30+
"MSVC_FLAGS",
31+
"MSVC_TEST_FLAGS",
3032
)
3133

3234
DEFAULT_COPTS = select({
3335
"//opencensus:llvm_compiler": LLVM_FLAGS,
36+
"//opencensus:windows": MSVC_FLAGS,
3437
"//conditions:default": GCC_FLAGS,
3538
})
3639

3740
TEST_COPTS = DEFAULT_COPTS + select({
3841
"//opencensus:llvm_compiler": LLVM_TEST_FLAGS,
42+
"//opencensus:windows": MSVC_TEST_FLAGS,
3943
"//conditions:default": GCC_TEST_FLAGS,
4044
})

0 commit comments

Comments
 (0)