[libc-commits] [libc] Revert "[libc] Avoid host header collisions in full builds (-nostdinc)" (PR #187079)

via libc-commits libc-commits at lists.llvm.org
Tue Mar 17 10:53:35 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Alexey Samsonov (vonosmas)

<details>
<summary>Changes</summary>

Reverts llvm/llvm-project#<!-- -->187025

Fails on openmp bot: https://lab.llvm.org/buildbot/#/builders/10/builds/24743
('INT64_MIN' macro redefined when used Clang-provided <stdint.h> is used)
fails on  RISC-V-32 bot: https://lab.llvm.org/buildbot/#/builders/196/builds/17067
due to MPFRNumber constructor not picking the right overload for uint32_t argument.

---
Full diff: https://github.com/llvm/llvm-project/pull/187079.diff


2 Files Affected:

- (modified) libc/hdr/func/aligned_alloc.h (-4) 
- (modified) libc/hdr/stdint_proxy.h (-4) 


``````````diff
diff --git a/libc/hdr/func/aligned_alloc.h b/libc/hdr/func/aligned_alloc.h
index 3c197f4671a76..b3436dfee1f23 100644
--- a/libc/hdr/func/aligned_alloc.h
+++ b/libc/hdr/func/aligned_alloc.h
@@ -11,11 +11,7 @@
 
 #ifdef LIBC_FULL_BUILD
 #include "hdr/types/size_t.h"
-#ifdef __cplusplus
-extern "C" void *aligned_alloc(size_t, size_t) noexcept;
-#else
 extern "C" void *aligned_alloc(size_t, size_t);
-#endif
 
 #else // Overlay mode
 
diff --git a/libc/hdr/stdint_proxy.h b/libc/hdr/stdint_proxy.h
index d5c600d5a28bf..8e815679a4e24 100644
--- a/libc/hdr/stdint_proxy.h
+++ b/libc/hdr/stdint_proxy.h
@@ -13,10 +13,6 @@
 // that is `libc.include.stdint` is added to the dependency of all targets
 // that use <stdint.h> header.
 
-#ifdef LIBC_FULL_BUILD
-#include "include/llvm-libc-macros/stdint-macros.h"
-#else
 #include <stdint.h>
-#endif
 
 #endif // LLVM_LIBC_HDR_STDINT_PROXY_H

``````````

</details>


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


More information about the libc-commits mailing list