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

Alexey Samsonov via libc-commits libc-commits at lists.llvm.org
Tue Mar 17 10:52:55 PDT 2026


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

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.

>From c85cf9880347a04708a20cb7a12a4f028874cbe8 Mon Sep 17 00:00:00 2001
From: Alexey Samsonov <vonosmas at gmail.com>
Date: Tue, 17 Mar 2026 10:50:53 -0700
Subject: [PATCH] Revert "[libc] Avoid host header collisions in full builds
 (-nostdinc) (#187025)"

This reverts commit bed77a1d9bf40c1ab0a55572df148e5a8c44e975.
---
 libc/hdr/func/aligned_alloc.h | 4 ----
 libc/hdr/stdint_proxy.h       | 4 ----
 2 files changed, 8 deletions(-)

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



More information about the libc-commits mailing list