Skip to content

Commit 4bcf1e6

Browse files
Update the libc BUILD.bazel file with selects for Windows builds. (#131172)
The Windows toolchain needs to build libc targets in order to support libc++. Currently, some targets fail to resolve, due to non-exhaustive select statements, not accounting for Windows builds. This change adds clauses to select statements so that Windows builds can proceed. Additionally, `__support_osutil_exit`, is configured to pass nothing to `srcs` for non-Linux builds. `__support_osutil_exit `is unconditionally included in the transitive dependencies of `extern_libc_shared`. --------- Co-authored-by: Brian Ledger <[email protected]>
1 parent 1c45514 commit 4bcf1e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,7 @@ libc_support_library(
13191319
"src/__support/OSUtil/linux/aarch64/syscall.h",
13201320
"src/__support/OSUtil/linux/x86_64/syscall.h",
13211321
],
1322+
"@platforms//os:windows": [],
13221323
}),
13231324
deps = [
13241325
":__support_common",
@@ -1360,6 +1361,7 @@ libc_support_library(
13601361
textual_hdrs = select({
13611362
"@platforms//os:macos": ["src/__support/OSUtil/darwin/io.h"],
13621363
"@platforms//os:linux": ["src/__support/OSUtil/linux/io.h"],
1364+
"@platforms//os:windows": ["src/__support/OSUtil/windows/io.h"],
13631365
}),
13641366
deps = [
13651367
":__support_common",

0 commit comments

Comments
 (0)