sourcery: statically link Swift runtime libraries
The current formula _requires_ that the user have the exact same version of Xcode as Homebrew's Jenkins CI machines located exactly at the same location (`/Applications/Xcode.app`). That's because the formula uses Swift Package Manager to build the bottle, which adds an `LC_RPATH` command to the binary with an absolute path to the SDK where the Swift runtime dynamic libraries can be found. So if you've installed Xcode anywhere else, or if the version of Xcode you have installed at that location isn't the same version as was used on Homebrew's Jenkins machines, you'll have to build from source using a command like `brew install sourcery --HEAD`.
This commit is contained in:
parent
dad0fd1ca0
commit
fc363d74eb
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ class Sourcery < Formula
|
|||
homepage "https://github.com/krzysztofzablocki/Sourcery"
|
||||
url "https://github.com/krzysztofzablocki/Sourcery/archive/0.5.9.tar.gz"
|
||||
sha256 "1f5dee5184a7271a70552c0e85dd1d730e711088e5fdcf3dd7aa1f96b993e414"
|
||||
revision 1
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -15,7 +16,7 @@ class Sourcery < Formula
|
|||
def install
|
||||
ENV.delete("CC")
|
||||
ENV["SDKROOT"] = MacOS.sdk_path
|
||||
system "swift", "build", "-c", "release"
|
||||
system "swift", "build", "-c", "release", "-Xswiftc", "-static-stdlib"
|
||||
bin.install ".build/release/sourcery"
|
||||
lib.install Dir[".build/release/*.dylib"]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue