Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support macOS CLIs with Xcode 10.2 #162

Closed
keith opened this issue Mar 24, 2019 · 1 comment
Closed

Support macOS CLIs with Xcode 10.2 #162

keith opened this issue Mar 24, 2019 · 1 comment

Comments

@keith
Copy link
Member

keith commented Mar 24, 2019

As of Xcode 10.2 beta 4, the swift_static directory inside Xcode has disappeared. When you attempt to use --static-swift-stdlib with Swift Package Manager this seems to be a very intentional change:

% swift build --static-swift-stdlib
warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/

In order to continue supporting older OS versions with CLIs, we'll need to add the rpath to the Swift libraries inside Xcode (or the system location for 10.14.4 and up). This change will also affect rules_apple which uses the static functionality for macOS CLIs and dylibs.

@allevato
Copy link
Member

Fixed by #163 (ac13c88).

There's a tiny workaround in there for older OSes that points the rpath to the Swift library directory inside Xcode so that local builds (like host tools written in Swift) still run without needing the extra package from Apple installed, but I'll remove that eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants