Skip to content

Commit 02f5154

Browse files
committed
use platforms for macos fix
1 parent fec8a31 commit 02f5154

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

WORKSPACE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,9 @@ git_repository(
5959
remote = "https://github.com/nlohmann/json.git",
6060
shallow_since = "1701207391 +0100",
6161
)
62+
63+
http_archive(
64+
name = "platforms",
65+
urls = ["https://github.com/bazelbuild/platforms/archive/refs/tags/0.0.6.zip"],
66+
strip_prefix = "platforms-0.0.6",
67+
)

src/BUILD

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ OPT_COPTS = select({
2727
"-fno-fast-math",
2828
"-flto",
2929
"-march=native",
30-
"-mmacosx-version-min=10.15"
3130
],
3231
":debug": ["-Og"],
33-
}) + ["-std=c++20"]
32+
}) + ["-std=c++20"] + select({
33+
"@platforms//os:macos": ["-mmacosx-version-min=10.15"],
34+
"//conditions:default": [],
35+
})
3436

3537
OPT_LINKOPTS = select({
3638
"//conditions:default": [

0 commit comments

Comments
 (0)