Skip to content

Commit 086ea00

Browse files
committed
add missing copts
1 parent 4bb62bc commit 086ea00

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@ CMAKE_FLAGS = {
4646
"//conditions:default": {"CMAKE_BUILD_TYPE": "Release"},
4747
})
4848

49+
COPTS = [
50+
"-mcx16",
51+
"-Wno-error=unknown-pragmas",
52+
]
53+
4954
cmake(
5055
name = "snmalloc",
5156
cache_entries = CMAKE_FLAGS,
5257
generate_args = ["-G Ninja"],
5358
lib_source = ":srcs",
59+
copts = COPTS,
5460
out_shared_libs = select({
5561
"@bazel_tools//src/conditions:darwin": [
5662
"libsnmallocshim-checks-memcpy-only.dylib",
@@ -72,6 +78,7 @@ cmake(
7278
cache_entries = CMAKE_FLAGS | {
7379
"SNMALLOC_RUST_SUPPORT": "ON",
7480
},
81+
copts = COPTS,
7582
generate_args = ["-G Ninja"],
7683
lib_source = ":srcs",
7784
out_shared_libs = select({

fuzzing/BUILD.bazel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ cc_test(
77
name = "snmalloc_fuzzer",
88
srcs = ["snmalloc-fuzzer.cpp"],
99
copts = [
10-
"-fexperimental-library", # needed for std::execution::unseq,
1110
"-fsanitize=address",
12-
],
11+
] + select({
12+
"@bazel_tools//tools/cpp:clang-cl": ["-fexperimental-library"], # needed for std::execution::unseq,
13+
"//conditions:default": ["-mcx16"],
14+
}),
1315
defines = [
1416
"SNMALLOC_USE_WAIT_ON_ADDRESS=0",
1517
"ADDRESS_SANITIZER",

0 commit comments

Comments
 (0)