Xcode 27 Removes ld64 and Requires Unique Module Names
Apple retired a linker in one sentence: “The ld64 linker has been removed and the -ld_classic option is no longer supported.”1 The flag now gone is a flag Apple told developers to add. Xcode 15’s own release notes offered -Wl,-ld_classic as the workaround for two linker bugs.3
TL;DR
- Xcode 27 removes ld64 and stops accepting
-ld_classic.1 Apple’s Xcode 15 notes prescribed the flag for weak-symbol crashes and LTO import bugs, Xcode 16 deprecated it, and Xcode 26 said nothing at all.3410 - A second break sits in the Swift compiler. Apple made dependency scanning one shared action, so “every Clang module reachable from a single Swift dependency-scan action must have a unique module name.”2 Apple hedges twice: the scan “may report an error,” and previously the scanner “may have tolerated duplicating names.”2
- Both fire on toolchain upgrade rather than a deployment target or SDK choice, and neither has a runtime component. The exposed population: vendored binaries, CocoaPods, or a large mixed Swift/Objective-C/C++ codebase.
- Apple’s “may” is not editorial caution. Under Xcode 26.6 I put two module maps declaring one name on a single search path and ran the scanner 20 times: nine runs crashed with SIGSEGV, five aborted, and six finished cleanly.8
- A vendored module map redeclaring an SDK module, the case Apple names, compiles silently today and hides the real module. My vendored
SQLite3shim typechecked with exit 0, andsqlite3_openstopped existing.8 - Across seven audited projects: zero
-ld_classic,OTHER_LDFLAGSunset everywhere, and zero duplicate module names among 391 module maps, because no repository holds a hand-authored one.9
Both notes ship in the Xcode 27 beta 4 release notes, alongside Swift 6.4 and the 27 SDKs.11 Read them as beta text.
The flag Apple told you to add
The story starts with a linker rewrite. Xcode 15 announced a new linker, made it the default “for all macOS, iOS, tvOS and visionOS binaries,” and set the terms of the retirement in one clause: “The…
评论
?
参与讨论