3 Commits

Author SHA1 Message Date
Alexey Samsonov
4b9693a423
Revert "[libc] Avoid host header collisions in full builds (-nostdinc)" (#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.
2026-03-17 11:25:53 -07:00
Jeff Bailey
bed77a1d9b
[libc] Avoid host header collisions in full builds (-nostdinc) (#187025)
When building the full library with -nostdinc, directly including
<stdint.h> may pull in host or compiler-provided headers that collide
with LLVM-libc's local macro definitions. Switch to using our internal
stdint-macros.h when LIBC_FULL_BUILD is enabled.

Additionally, declare aligned_alloc with noexcept in C++ to match common
C library declarations and avoid fatal type specification mismatches
during sysroot builds.
2026-03-17 16:12:05 +00:00
Job Henandez Lara
9cfe3028ca
[libc] Add proxy headers to handle memory allocation associated with the header `#include <stdlib.h> (#114690)
This finishes the work from
https://github.com/llvm/llvm-project/pull/114453 by adding proxy headers
for `malloc`, `realloc`, `free` and `aligned_alloc`.
2024-11-03 11:28:24 -08:00