Skip to content

Commit 990e4f9

Browse files
[compiler-rt][Bazel] Support profile runtime on macOS and iOS (#214154)
1 parent 25e1c16 commit 990e4f9

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

  • utils/bazel/llvm-project-overlay/compiler-rt

utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,24 @@ package(
1111

1212
licenses(["notice"])
1313

14+
POSIX_PROFILE_DEFINES = [
15+
"COMPILER_RT_HAS_ATOMICS=1",
16+
"COMPILER_RT_HAS_FCNTL_LCK=1",
17+
"COMPILER_RT_HAS_UNAME=1",
18+
]
19+
1420
cc_library(
1521
name = "config",
1622
defines = select({
17-
"@platforms//os:linux": [
18-
"COMPILER_RT_HAS_ATOMICS=1",
19-
"COMPILER_RT_HAS_FCNTL_LCK=1",
20-
"COMPILER_RT_HAS_UNAME=1",
21-
],
23+
"@platforms//os:ios": POSIX_PROFILE_DEFINES,
24+
"@platforms//os:linux": POSIX_PROFILE_DEFINES,
25+
"@platforms//os:macos": POSIX_PROFILE_DEFINES,
2226
# Will raise error unless supported platforms.
2327
}),
2428
target_compatible_with = select({
29+
"@platforms//os:ios": [],
2530
"@platforms//os:linux": [],
31+
"@platforms//os:macos": [],
2632
"//conditions:default": ["@platforms//:incompatible"],
2733
}),
2834
)

0 commit comments

Comments
 (0)