Skip to content

Commit 14be493

Browse files
authored
[bazel] Make compiler-rt analyze on macOS (#86001)
Previously the select above would fail for non-linux platforms if you did a `bazel build @llvm-project//...`, now this target specifies that it's only supported on the linux platform through bazel's `target_compatible_with` feature. This makes all targets in the tree be ignored when building on incompatible platforms (and fail if built directly)
1 parent 215f105 commit 14be493

File tree

1 file changed

+4
-0
lines changed
  • utils/bazel/llvm-project-overlay/compiler-rt

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ cc_library(
1919
],
2020
# Will raise error unless supported platforms.
2121
}),
22+
target_compatible_with = select({
23+
"@platforms//os:linux": [],
24+
"//conditions:default": ["@platforms//:incompatible"],
25+
}),
2226
)
2327

2428
WIN32_ONLY_FILES = [

0 commit comments

Comments
 (0)