Skip to content

Commit 786761c

Browse files
committed
[libc][bazel] explicitly use system-provided errno in Bazel builds.
Addressing the comments from PR #130368 review. Since Bazel builds are effectively overlay mode, switch to explicitly setting -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_SYSTEM configuration option, so that unit tests and release builds are consistent. Verified that all the unit tests pass with this flag specified.
1 parent 9f170e6 commit 786761c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ LIBC_CONFIGURE_OPTIONS = [
4444
# "LIBC_COPT_STRTOFLOAT_DISABLE_EISEL_LEMIRE",
4545
# "LIBC_COPT_STRTOFLOAT_DISABLE_SIMPLE_DECIMAL_CONVERSION",
4646

47+
# Documentation in libc/src/errno/...
48+
# Since we're only using Bazel for overlay build for now, explicitly
49+
# enforce using the system-provided errno in both tests and release build.
50+
"LIBC_ERRNO_MODE=LIBC_ERRNO_MODE_SYSTEM",
51+
4752
# Documentation in libc/src/__support/libc_assert.h
4853
# "LIBC_COPT_USE_C_ASSERT",
4954
]

0 commit comments

Comments
 (0)