Repository navigation
Conversation
…, so a package built for 13.0 no longer warns once per object (#2316) Root cause: link_stage_macho_macos_minos (src/compiler/Link.w) read only a bare 64-bit Mach-O (magic at offset 0); an archive returned 0. And link_stage_darwin_platform_version scanned the program object and the extra inputs, never the archives the `-l` names resolve to, which is how a `with get` package is linked (`-L <dep>/lib -lxml2`). A Conan libxml2.a built for macOS 13.0 linked at `-platform_version macos 11.0` and ld64.lld printed "libxml2.a(threads.c.o) has version 13.0.0, which is newer than target minimum of 11.0" 47 times. The minos scan walks an archive's members (BSD `#1/<n>` names included). The link's target is 11.0 or the newest input: objects, extras, and each `-l` name resolved over the link's -L directories as ld64 searches (a dylib or .tbd first, then the archive). An input never targets a newer macOS than the program. Test: test/internals/link_darwin_archive_minos_test.w (a synthesized archive with 13.0 and 12.0 members gives "13.0"; without it "11.0"). Verified: `with get c.libxml2` + `with build` printed 47 warnings with the installed compiler.
ehartford
marked this pull request as ready for review
October 25, 2026 22:13
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.
Root cause: link_stage_macho_macos_minos (src/compiler/Link.w) read only a
bare 64-bit Mach-O (magic at offset 0); an archive returned 0. And
link_stage_darwin_platform_version scanned the program object and the extra
inputs, never the archives the
-lnames resolve to, which is how awith getpackage is linked (-L <dep>/lib -lxml2). A Conan libxml2.a builtfor macOS 13.0 linked at
-platform_version macos 11.0and ld64.lld printed"libxml2.a(threads.c.o) has version 13.0.0, which is newer than target
minimum of 11.0" 47 times.
The minos scan walks an archive's members (BSD
#1/<n>names included).The link's target is 11.0 or the newest input: objects, extras, and each
-lname resolved over the link's -L directories as ld64 searches (a dylibor .tbd first, then the archive). An input never targets a newer macOS than
the program.
Test: test/internals/link_darwin_archive_minos_test.w (a synthesized
archive with 13.0 and 12.0 members gives "13.0"; without it "11.0").
Verified:
with get c.libxml2+with buildprinted 47 warnings with theinstalled compiler.
Closes #2316