[libc] [llvm] [libc] Move libc_errno.h to libc/src/__support and make LIBC_ERRNO_MODE_SYSTEM to be header-only. (PR #143187)

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 14:17:13 PDT 2025


================
@@ -46,4 +46,7 @@ LIBC_CONFIGURE_OPTIONS = [
 
     # Documentation in libc/src/__support/libc_assert.h
     # "LIBC_COPT_USE_C_ASSERT",
+
+    # Use system errno.
+    "LIBC_ERRNO_MODE=LIBC_ERRNO_MODE_SYSTEM",
----------------
vonosmas wrote:

This may be a bit prematurely - since this change would enforce `LIBC_ERRNO_MODE_SYSTEM` both for "production" Bazel build and for all the tests. We need to re-run downstream tests to confirm it wouldn't break them - in the past this was a breaking change (which triggered the whole ErrnoCheckingTest refactoring), and there might still be some tests that would fail. I would suggest to leave it out of this CL.

https://github.com/llvm/llvm-project/pull/143187


More information about the llvm-commits mailing list