lntue wrote: Currently, bazel build is essentially in overlay mode. So I think we should define `-DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_SYSTEM` for the errno target. Can you try to see if it's fine for our tests? https://github.com/llvm/llvm-project/pull/130368