Repository navigation
build: compile the shared libc headers, thread priority and three tests on macOS - #10362
Closed
iamthehimansh wants to merge 1 commit into
Closed
iamthehimansh wants to merge 1 commit into
iamthehimansh wants to merge 1 commit into
Conversation
…ts on macOS A macOS build of main failed 49 objects. Most included libc/include/FileStream.hpp, whose global-namespace ::feof_unlocked and ::ferror_unlocked do not exist there (they are macros in the macOS SDK). On macOS: - FileStream.hpp calls feof_unlocked and ferror_unlocked unqualified. - ExportMacros.hpp adds the leading underscore Mach-O gives C symbols to both names in APS5_EXPORT, so the .set alias resolves. - ThreadPriority.cpp has no rtkit or RLIMIT_RTTIME; "high" asks for the user-interactive QoS class and "rt" for a Mach time-constraint policy (period 1 ms, computation 0.5 ms), documented in ENVIRONMENT.md. - Formatting.cpp maps the SysV va_list builtins to va_list, and GuestContentSearch.cpp and GuestNpWebApi2.cpp include <initializer_list>. With these, 16 objects still fail on macOS; each is in a file changed by an open macOS PR. Linux and Windows compile the same code as before.
|
Thank you for your contribution! Authors with no pull requests merged into |
12 tasks done
This was referenced Oct 23, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part 1 of splitting #8658 into topic PRs, as @adriadam10 asked: the shared-file build fixes that let
maincompile further on macOS. #4627 (@mugurc) has since landed theFormatting.cppandExportMacros.hppparts, so this PR now carries only what is still missing onmain.Changes, all on macOS only:
FileStream.hpp: callfeof_unlocked/ferror_unlockedunqualified. The macOS SDK defines them as macros, so::feof_unlockeddoes not exist.StandardExceptions.cpp:const_castthe error-category vtable slot before the function-pointerreinterpret_cast, which Apple clang rejects as casting away qualifiers. Without itlibc/src/exception/Exports.cppfails to build sincestd::system_categorylanded.ThreadPriority.cpp: macOS has no rtkit orRLIMIT_RTTIME.highasks for the user-interactive QoS class, andrtfor a Mach time-constraint policy (period 1 ms, computation 0.5 ms), documented indocs/dev/ENVIRONMENT.md.GuestContentSearch.cppandGuestNpWebApi2.cpp: include<initializer_list>.On macOS,
mainstill fails 13 objects with this PR. Each is in a file another open macOS PR changes:libc/src/GuestAllocations.cppfix/macos-guest-allocations-dyld, PR to be opened by @krishalivaibhavlibkernel/DirectMemory/DirectMemory.cpplibkernel/Pthread/src/Thread.cpp,System/src/Process.cpplibkernel/System/src/Exception.cpp,tests/GuestRaiseException.cpplibkernel/File/src/NativeStat.cpp,SharedMemory.cpp,Stdio.cpp,Module/src/DynamicLoader.cpp,ModuleInfo.cpp,System/src/Rtld.cppWhy
Upstream CI does not build macOS, so shared headers and new code keep breaking the macOS build of every library. Landing these first keeps the topic PRs from #8658 small, so each can be checked on its own.
Testing
mainata23f8fc9f: the remaining failures are the 13 objects above.unifdef -U__APPLE__(with-D__linux__and with-D_WIN32) equalsmain.python3 tools/check_conventions.py --base origin/main: all checks passed.Depends on: none. Tracking: #8658.
AI-assisted: yes (Cana)