Skip to content

Commit

Permalink
Try to fix Windows Bazel build
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiebeckley committed Jan 30, 2023
1 parent ffb0e47 commit 750d0f6
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,33 @@ exports_files([
"LICENSE",
])

COMMON_COPTS = [
"-ffunction-sections",
"-fdata-sections",

"-Werror",
"-Wswitch",
"-Wimplicit-fallthrough",
"-Wunused-variable",
]

COMMON_CPPOPTS = COMMON_COPTS + [
"-std=c++14",
]
COMMON_COPTS = select({
"@bazel_tools//src/conditions:windows": [
"/Gy",
"/Gw",

"/Wall",
"/WX",
],
"//conditions:default": [
"-ffunction-sections",
"-fdata-sections",

"-Werror",
"-Wswitch",
"-Wimplicit-fallthrough",
"-Wunused-variable",
],
})

COMMON_CPPOPTS = select({
"@bazel_tools//src/conditions:windows": COMMON_COPTS + [
"/std:c++14"
],
"//conditions:default": COMMON_COPTS + [
"-std=c++14",
]
})

COMMON_LINKOPTS = select({
"@bazel_tools//src/conditions:darwin": ["-Wl,--dead_strip"],
Expand Down

0 comments on commit 750d0f6

Please sign in to comment.