aboutsummaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)AuthorFilesLines
2026-01-12[libc] update add_math_function.md to reflect __support/math refactor (#175500)Anonmiraj1-3/+35
Updated the math guide to reflect the recent refactor closes #175371.
2026-01-12[libc] Fix a typo in DT_BIND_NOW macro name (#175619)Petr Hosek1-1/+1
This was accidentally introduced in #172766.
2026-01-12[libc] Provide a minimal implementation of elf.h (#172766)Petr Hosek102-54/+3048
Some of the baremetal users of libc use elf.h to generate coredumps and we would like to support this use case without needing Linux elf.h.
2026-01-12[libc] Improve SIMT control flow in the GPU allocatorJoseph Huber1-39/+46
Summary: The Volta independent thread scheduling is very difficult to work with. This is a first attempt to make the logic more sound when lanes execute independently. This isn't all that's required, but it ends up improving control flow for AMDGPU as well.
2026-01-12[libc][math] Refactor ilogbf16 implementation to header-only in ↵mitchell8-8/+80
src/__support/math folder. (#175450) Closes [#175346](https://github.com/llvm/llvm-project/issues/175346), Part of #175344
2026-01-12[libc][math] Fix GPU build fails (#175474)Muhammad Bassiouni5-11/+8
2026-01-12[libc][math] Refactor log to header-only shared math (#175395)CarvedCoder11-864/+932
Refactors log to a header-only shared math implementation. Fixes #175369
2026-01-09[libc] Support for generating proxy headers (#175279)Petr Hosek4-2/+11
This is a follow up to #174823 which adds build system integration.
2026-01-09[libc][math] Refactor sin implementation to header-only in ↵lntue8-177/+226
src/__support/math folder. (#175200) Part of #147386 in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-10[libc][math] Refactor expm1f16 implementation to header-only in ↵Muhammad Bassiouni8-139/+204
src/__support/math folder. (#162132) Part of #147386 in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2026-01-07[libc] Add hdrgen --proxy mode (#174823)Roland McGrath4-20/+103
This adds the --proxy switch to generate headers like go into libc/src/hdr/foo-proxy.h instead of public headers.
2026-01-06[libc] Provide empty weak definition for __cxa_thread_finalize (#174373)Petr Hosek1-8/+12
This avoids the GOT slot being generated which is undesirable when using static linking. A better solution would be to reorganize the code to avoid the use of weak symbols altogether. Fixes #173409
2026-01-06[libc][docs] Fix typo (#174631)Michael Jones1-1/+1
There was a typo introduced in #168637, this PR fixes it. Thanks to Nikolas for pointing it out.
2026-01-06[libc][wctype] Create generation script for classification lookup tables ↵Marcell Leleszi11-0/+4630
(#172042) [#172040](https://github.com/llvm/llvm-project/issues/172040) This patch implements the scripts for generating the lookup tables and associated utils for wctype classification functions. Not all Unicode properties are covered as not all need a lookup table, the rest will be hardcoded. The size of the generated tables is 47,8KB.
2026-01-05[libc] Delete teardown_main_tls and all its uses (#174374)Petr Hosek5-17/+1
teardown_main_tls is called right before the main process exit to unmap the TLS but that's unnecesary since the process is terminating anyway, this just introduces extra system call. This can be potentially harmful in case one of the other threads tries the access the memory that has been unmapped. Other C library implementations don't unmap TLS either so this makes LLVM libc's behavior more consistent. Fixes #173409
2026-01-05[libc][math] Fix the FTZ/DAZ checks for log1p. (#174424)lntue1-2/+2
The previous checks will fail with https://github.com/llvm/llvm-project/pull/174123. See https://github.com/llvm/llvm-project/pull/174290#issuecomment-3708052716 for the discussion.
2025-12-30[libc][fuzzing] Delete test buffs for asan checks (#174018)Kyungtak Woo1-6/+5
I'm currently getting "Detected memory leaks" errors due to this. This change should always delete the buffers after use.
2025-12-23[libc] Add stub pthread_attr_getschedparam / pthread_attr_setschedparam ↵Roland McGrath6-0/+126
(#173440) Add the boilerplate for declaring these POSIX functions and providing implementations. So far the only implementations are just stubs that fail with ENOTSUP, and they are neither tested nor included in any CMake entrypoints lists. More work is still required to add the actual fields to the pthread_attr_t and implement the support in the Linux pthread_create et al, but that is not done here. It's not an especially large amount of work, but more than just trivial. The scaffolding here paves the way for that later work, but is also immediately useful for filling out the subset of POSIX pthread_attr_* functions that Fuchsia's libc already supports.
2025-12-23[libc] add missing header to alloc-checker (#173400)Kyungtak Woo1-0/+1
Adding `#include "src/__support/CPP/new.h"` due to align_val_t usage within alloc-checker.h
2025-12-22[libc] Split out src/__support/alloc-checker.h (#173104)Roland McGrath18-76/+123
This moves the libc-internal AllocChecker API out of src/__support/CPP/new.h and updates CPP/README.md to state the intent to keep src/__support/CPP and the LIBC_NAMESPACE::cpp namespace a "pure" subset of standard C++ API polyfills.
2025-12-22[libc][math] Add LIBC_CONF_MATH_USE_SYSTEM_FENV / LIBC_MATH_USE_SYSTEM_FENV ↵lntue41-2/+141
(#172902) This is to allow math function implementations to use system libc's fenv.h instead of internal fenv implementations.
2025-12-19[libc][docs] Update website to reflect new strategy (#168637)Michael Jones2-23/+62
The LLVM-libc goals are updated to better reflect the strategy shared at the LLVM dev meeting 2025.
2025-12-19[libc][math] Refactor expm1f implementation to header-only in ↵Muhammad Bassiouni8-170/+228
src/__support/math folder. (#162131) Part of #147386 in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-12-18[libc] Add `IN6_IS_ADDR_V4COMPAT` (#172646)Connector Switch2-0/+17
This patch adds the `IN6_IS_ADDR_V4COMPAT` macro, which checks whether an address is IPv4-compatible.
2025-12-18[libc] Add `IN6_IS_ADDR_V4MAPPED` (#172645)Connector Switch2-0/+15
This patch adds the `IN6_IS_ADDR_V4MAPPED` macro, which checks whether an address is IPv4 mapped address.
2025-12-18[libc] Add `IN6_IS_ADDR_MC*` (#172643)Connector Switch2-0/+34
This patch adds the `IN6_IS_ADDR_MC*` macro, which checks whether an address is multicast node-local address, multicast link-local address, multicast site-local address, multicast organization-local address and multicast global address.
2025-12-18[libc] Add `IN6_IS_ADDR_MULTICAST` (#172498)Connector Switch2-0/+8
This patch adds the `IN6_IS_ADDR_MULTICAST` macro, which checks whether an address is multicast address.
2025-12-18[libc] Add `IN6_IS_ADDR_LOOPBACK` (#172312)Connector Switch2-0/+14
This patch adds the `IN6_IS_ADDR_LOOPBACK` macro, which checks whether an address is loopback address.
2025-12-18[libc] Add `IN6_IS_ADDR_UNSPECIFIED` (#172311)Connector Switch2-0/+13
This patch adds the `IN6_IS_ADDR_UNSPECIFIED` macro, which checks whether an address is unspecified address.
2025-12-17[libc] Cast the error value to int (#172724)Petr Hosek1-1/+1
The negative value represents an error and we already use cast in this scenario elsewhere.
2025-12-17[libc][fenv] Fix performance regression for x86 mxcsr utilities. (#172717)lntue1-6/+6
In a recent update to x86's fenv, we use `_MM_GET/SET_EXCEPTION_STATE` macros from `<immintrin.h>` which turn out to do a bit more work than just read and write the mxcsr register. In this PR we change those to a direct read and write mxcsr intrinsics.
2025-12-17[libc] Support opaque FILE* on baremetal (#168931)Petr Hosek31-226/+988
This change expands the stdio support on baremetal to support opaque FILE*. This builds on top of the existing baremetal embedding API; we treat the standard FILE* streams as pointers that point to the cookie symbols which are a part of the embedding API. This also allows users to define their own FILE* streams, but we don't (yet) support the API that return FILE* such as fopen or fopencookie.
2025-12-17libc: Prefix Rounding Control Error enum to avoid conflict in windows build ↵Jinsong Ji3-4/+4
(#172562) Similar to e85a9f5540f5 Somehow conflict with define in wingdi.h. Fix build failures: ...FPUtil\x86_64\fenv_x86_common.h(78,29): error: expected member name or ';' after declaration specifiers 78 | static constexpr uint16_t ERROR = 0xFFFF; | ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ c:\Program files (x86)\Windows Kits\10\include\10.0.22000.0\um\wingdi.h(118,29): note: expanded from macro 'ERROR' 118 | #define ERROR 0 |
2025-12-17[libc][CPP] make the string trap on OOM (#172260)Schrodinger ZHU Yifan1-2/+5
This PR makes the string trap on OOM. Previously, the `__builtin_unreachable` has made debugging tricky as it makes the control flow of OOM as an undefined behavior. We can run into OOM with testing configuration easily where memory is statically bounded. We did not settle with the best solution of this but making it trap is at least better than UB in this case.
2025-12-16[libc][fuzzing] Improve printf long double fuzzing (#172113)Michael Jones1-5/+12
Previously we only checked the long double value of the provided double. This meant we didn't check any values near the edge of the long double range, which meant we were missing several bugs. This patch adds a second long double value to check which is generated separately from the double value and can be anywhere in the range.
2025-12-16[libc] Add Darwin mutex support via os_sync primitives (#167722)Shreeyash Pandey19-62/+232
This patch implements the generic mutex and raw_mutex interfaces on macOS. A new Futex class is provided that relies on os_sync_wait and os_sync_wake to emulate futex‑like wait and wake semantics. The OS‑specific part is moved into futex_utils, which now contains the Darwin implementation.
2025-12-15[libc] Fix ifdef in compiler.h. (#172324)lntue1-1/+1
2025-12-15Revert "[APFloat] Add exp function for APFloat::IEEESsingle using expf ↵Mehdi Amini2-44/+0
implementation from LLVM libc. (#143959)" (#172325) This reverts commit 4190d576823c18f45ee0632baee7d798448178ac. See https://lab.llvm.org/buildbot/#/builders/181/builds/33524 ``` from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/APFloat.cpp:32: /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../libc/src/__support/math/asin_utils.h:548:1: in ‘constexpr’ expansion of ‘__llvm_libc::fputil::DyadicFloat<128>(__llvm_libc::Sign::POS, -127, __llvm_libc::BigInt<128, false, long unsigned int>(__llvm_libc::operator""_u128(((const char*)"0x80000000\'00000000\'00000000\'00000000"))))’ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../libc/src/__support/FPUtil/dyadic_float.h:109:5: in ‘constexpr’ expansion of ‘((__llvm_libc::fputil::DyadicFloat<128>*)this)->__llvm_libc::fputil::DyadicFloat<128>::normalize()’ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../libc/src/__support/FPUtil/dyadic_float.h:118:16: in ‘constexpr’ expansion of ‘((__llvm_libc::fputil::DyadicFloat<128>*)this)->__llvm_libc::fputil::DyadicFloat<128>::mantissa.__llvm_libc::BigInt<128, false, long unsigned int>::operator<<=(((size_t)shift_length))’ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../libc/src/__support/big_int.h:829:52: in ‘constexpr’ expansion of ‘__llvm_libc::multiword::shift<__llvm_libc::multiword::LEFT, false, long unsigned int, 2>(((__llvm_libc::BigInt<128, false, long unsigned int>*)this)->__llvm_libc::BigInt<128, false, long unsigned int>::val, s)’ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../libc/src/__support/big_int.h:264:35: error: ‘constexpr __llvm_libc::cpp::enable_if_t<((((sizeof (To) == sizeof (From)) && __llvm_libc::cpp::is_trivially_constructible<To>::value) && __llvm_libc::cpp::is_trivially_copyable<T>::value) && __llvm_libc::cpp::is_trivially_copyable<From>::value), To> __llvm_libc::cpp::bit_cast(const From&) [with To = __int128 unsigned; From = __llvm_libc::cpp::array<long unsigned int, 2>; __llvm_libc::cpp::enable_if_t<((((sizeof (To) == sizeof (From)) && __llvm_libc::cpp::is_trivially_constructible<To>::value) && __llvm_libc::cpp::is_trivially_copyable<T>::value) && __llvm_libc::cpp::is_trivially_copyable<From>::value), To> = __int128 unsigned]’ called in a constant expression 264 | auto tmp = cpp::bit_cast<type>(array); | ~~~~~~~~~~~~~~~~~~~^~~~~~~ from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/APFloat.cpp:32: /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../libc/src/__support/CPP/bit.h:48:1: note: ‘constexpr __llvm_libc::cpp::enable_if_t<((((sizeof (To) == sizeof (From)) && __llvm_libc::cpp::is_trivially_constructible<To>::value) && __llvm_libc::cpp::is_trivially_copyable<T>::value) && __llvm_libc::cpp::is_trivially_copyable<From>::value), To> __llvm_libc::cpp::bit_cast(const From&) [with To = __int128 unsigned; From = __llvm_libc::cpp::array<long unsigned int, 2>; __llvm_libc::cpp::enable_if_t<((((sizeof (To) == sizeof (From)) && __llvm_libc::cpp::is_trivially_constructible<To>::value) && __llvm_libc::cpp::is_trivially_copyable<T>::value) && __llvm_libc::cpp::is_trivially_copyable<From>::value), To> = __int128 unsigned]’ is not usable as a ‘constexpr’ function because: 48 | bit_cast(const From &from) { | ^~~~~~~~ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../libc/src/__support/CPP/bit.h:56:28: error: call to non-‘constexpr’ function ‘void __llvm_libc::cpp::inline_copy(const char*, char*) [with unsigned int N = 16]’ 56 | inline_copy<sizeof(From)>(src, dst); ```
2025-12-15[APFloat] Add exp function for APFloat::IEEESsingle using expf ↵lntue2-0/+44
implementation from LLVM libc. (#143959) Discourse RFC: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450 - The implementation in LLVM libc is header-only. - expf implementation in LLVM libc is correctly rounded for all rounding modes. - LLVM libc implementation will round to the floating point environment's rounding mode. - No cmake build dependency between LLVM and LLVM libc, only requires LLVM libc source presents in llvm-project/libc folder.
2025-12-13[libc] Add `IN6_IS_ADDR_{LINK, SITE}LOCAL` (#168207)Connector Switch2-16/+27
This patch introduces two macros in `netinet/in.h`. The redundant tests for macro values in the testcases have been removed.
2025-12-12[libc] Properly fix printf long double subnormals (#172103)Michael Jones2-9/+22
In a previous PR I fixed one case where subnormal long doubles would cause an infinite loop in printf. It was an improper fix though. The problem was that a shift on the fixed point representation would sometimes go negative, since the effective exponent of a subnormal is lower than the minimum allowed exponent value. This patch extends the fixed point representation to have space for subnormals, and adds an assert to check that lshifts are always positive. The previous fix of sometimes shifting right instead of left caused a loss of precision which also sometimes caused infinite loops in the %e code.
2025-12-12[libc][wctype][codegen] Add generation script for conversion data (#170868)Muhammad Bassiouni7-0/+918
Closes #170871
2025-12-11[libc] Refactor static polymorphism in WriteBuffer (NFC). (#169089)Alexey Samsonov17-154/+162
There are three flavors of WriteBuffer currently, all of which could be passed into `printf_core::Writer` class. It's a tricky class, since it chooses a flavor-specific logic either based on runtime dispatch (to save code size and prevent generating three versions of the entirety of printf_core), or based on template arguments (to avoid dealing with function pointers in codegen for `FILL_BUFF_AND_DROP_OVERFLOW` path). Refactor this somewhat convoluted logic to have three concrete subclasses inheriting from the templated base class, and use static polymorphism with `reinterpret_cast` to implement dispatching above. Now we can actually have flavor-specific fields, constructors, and methods (e.g. `flush_to_stream` is now a method of `FlushingBuffer`), and the code on the user side is cleaner: the complexity of enabling/disabling runtime-dispatch and using proper template arguments is now localized in `writer.h`. This code will need to be further templatized to support buffers of type `wchar_t` to implement `swprintf()` and friends. This change would make it (ever so slightly) easier.
2025-12-11[libc] Add support for getpagesize. (#171713)Sterling-Augustine11-0/+108
As in the description.
2025-12-11[libc][darwin] avoid importing macros conflicting with function names in ↵Schrodinger ZHU Yifan1-0/+14
overlay mode (#171691) MacOS SDK defines certain functions as macros in its stdio header. This leads to problems in overlay mode. This patch add undefs to macros that may conflict with function names in overlay header. We don't expect to import them via overlay macro headers anyway. ```bash FAILED: [code=1] libc/src/__support/File/CMakeFiles/libc.src.__support.File.file.dir/file.cpp.o sccache /usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_22_0_0_git -D_DEBUG -I/Users/runner/work/llvm-project/llvm-project/libc -isystem /Users/runner/work/llvm-project/llvm-project/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -std=gnu++17 -arch arm64 -I /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk/usr/include -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=element -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=element -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -MD -MT libc/src/__support/File/CMakeFiles/libc.src.__support.File.file.dir/file.cpp.o -MF libc/src/__support/File/CMakeFiles/libc.src.__support.File.file.dir/file.cpp.o.d -o libc/src/__support/File/CMakeFiles/libc.src.__support.File.file.dir/file.cpp.o -c /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.cpp In file included from /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.cpp:9: /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.h:260:8: error: expected member name or ';' after declaration specifiers 260 | void clearerr_unlocked() { err = false; } | ~~~~ ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:495:30: note: expanded from macro 'clearerr_unlocked' 495 | #define clearerr_unlocked(p) __sclearerr(p) | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:383:26: note: expanded from macro '__sclearerr' 383 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ^ In file included from /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.cpp:9: /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.h:260:8: error: expected ')' /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:495:30: note: expanded from macro 'clearerr_unlocked' 495 | #define clearerr_unlocked(p) __sclearerr(p) | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:383:26: note: expanded from macro '__sclearerr' 383 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ^ /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.h:260:8: note: to match this '(' /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:495:30: note: expanded from macro 'clearerr_unlocked' 495 | #define clearerr_unlocked(p) __sclearerr(p) | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:383:25: note: expanded from macro '__sclearerr' 383 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ^ In file included from /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.cpp:9: /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.h:260:8: error: unknown type name '_flags' 260 | void clearerr_unlocked() { err = false; } | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:495:30: note: expanded from macro 'clearerr_unlocked' 495 | #define clearerr_unlocked(p) __sclearerr(p) | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:383:37: note: expanded from macro '__sclearerr' 383 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ^ In file included from /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.cpp:9: /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.h:260:8: error: a type specifier is required for all declarations /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:495:30: note: expanded from macro 'clearerr_unlocked' 495 | #define clearerr_unlocked(p) __sclearerr(p) | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:383:34: note: expanded from macro '__sclearerr' 383 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ^ In file included from /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.cpp:9: /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.h:260:8: error: expected ')' /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:495:30: note: expanded from macro 'clearerr_unlocked' 495 | #define clearerr_unlocked(p) __sclearerr(p) | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:383:44: note: expanded from macro '__sclearerr' 383 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ^ /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.h:260:8: note: to match this '(' /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:495:30: note: expanded from macro 'clearerr_unlocked' 495 | #define clearerr_unlocked(p) __sclearerr(p) | ^ /Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:383:31: note: expanded from macro '__sclearerr' 383 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ^ /Users/runner/work/llvm-project/llvm-project/libc/src/__support/File/file.cpp:426:23: error: out-of-line definition of 'mode_flags' does not match any declaration in '__llvm_libc_22_0_0_git::File' 426 | File::ModeFlags File::mode_flags(const char *mode) { | ^~~~~~~~~~ 6 errors generated. ```
2025-12-11[libc][docs] Add a sunset policy to porting docs (#168936)Michael Jones3-20/+73
As discussed in the monthly meeting, update the porting docs to clarify what's needed for a target and add a policy for sunsetting targets.
2025-12-08[libc] move abs_timesout and monotonicity out of linux dir (#167719)Shreeyash Pandey15-46/+53
This patch moves abs_timeout and monotonicity out of the linux dir into common. Both of these functions depend on clock_gettime which is the actual os-dependent component. As other features in `__support/threads` may want to use these, it's better to share it in common.
2025-12-05Include inline_strlen.h on aarch64 only if the target has vector instrucions ↵Sterling-Augustine1-1/+2
(#170892)
2025-12-05[libc][fenv] Refactor x86 fenv implementations to make it work for various ↵lntue19-672/+1064
fenv_t. (#165015)
2025-12-05[libc] Remove extra commas in linux/config.json. (#170801)lntue1-2/+2