Files
rust/compiler
Jonathan Brouwer aa9d13374b Rollup merge of #156814 - cezarbbb:fix-issue-156714, r=jieyouxu
Extend macOS deployment target mismatch filter to cover dylib and new ld formats

The `deployment_mismatch` filter in `report_linker_output` only matched the old ld64 format for object files. With linker-messages promoted to warn-by-default in rust-lang/rust#153968, unfiltered deployment target warnings from dylibs and the new Apple linker (ld_prime) now surface as noise for users who never set `MACOSX_DEPLOYMENT_TARGET`.

Fixes rust-lang/rust#156714.

At present, the filter works only covered the specific format:

`ld: warning: object file (...) was built for newer 'macOS' version (...) than being linked (...)`

This was fine because linker-messages was `Allow-by-default` — nobody saw the other formats anyway. Then rust-lang/rust#153968 promoted it to Warn, and the gaps became visible.

Broadens the filter to cover all known ld deployment target version mismatch formats:

`ld: warning: object file (...)` — old ld64, already handled
`ld: warning: dylib (...)` — old ld64, was missing
All Apple platforms (`iOS`, `tvOS`, `watchOS`, `xrOS`, etc.), not just `macOS`
`ld: building for <platform>-A.B, but linking with dylib '...' which was built for newer version C.D` — new linker (ld_prime, Xcode 15+), the exact format from rust-lang/rust#156714

All matched messages are downgraded to `linker_info` (Allow-by-default), consistent with the existing behavior for the object file case.
2026-05-27 08:14:26 +02:00
..
2026-05-26 21:35:25 +08:00