Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#121430 - madsmtm:mac-catalyst-iOSSupport, r=w…
…esleywiser Add `/System/iOSSupport` to the library search path on Mac Catalyst On macOS, `/System/iOSSupport` contains iOS frameworks like UIKit, which is the whole idea of Mac Catalyst. To link to these, we need to explicitly tell the linker about the support library stubs provided in the macOS SDK under the same path. Concretely, when building a binary for Mac Catalyst, Xcode passes the following flags to the linker: ``` -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/iOSSupport/System/Library/Frameworks -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/iOSSupport/usr/lib ``` This is not something that can be disabled (it's enabled as soon as you enable `SUPPORTS_MACCATALYST`), so I think it's pretty safe to say that we don't need an option to turn these off. I've chosen to slightly deviate from what Xcode does and use `-F` instead of `-iframework`, since we don't need to change the header search path, and this way the flags nicely match on all the linkers. From what I could tell by reading Clang sources, there shouldn't be a difference when just running the linker. CC `@BlackHoleFox,` `@shepmaster` (I accidentally let rustbot choose the reviewer).
- Loading branch information