-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Statically Linked Binary #1951
Statically Linked Binary #1951
Conversation
It will be more desirable behavior when `make install` on Linux.
You have to run Should be fixed in future releases that include apple/swift-package-manager#1320 though. |
Codecov Report
@@ Coverage Diff @@
## master #1951 +/- ##
=========================================
Coverage ? 88.79%
=========================================
Files ? 245
Lines ? 11920
Branches ? 0
=========================================
Hits ? 10584
Misses ? 1336
Partials ? 0 Continue to review full report at Codecov.
|
Homebrew uses sandbox on building bottle.
Can you explain why this is marked as WIP? |
I expected to be able to install with
|
It also changed to using |
Using following patch for diff --git a/Formula/swiftlint.rb b/Formula/swiftlint.rb
index 867b09adc..f4d426cb7 100644
--- a/Formula/swiftlint.rb
+++ b/Formula/swiftlint.rb
@@ -4,7 +4,7 @@ class Swiftlint < Formula
url "https://github.com/realm/SwiftLint.git",
:tag => "0.24.0",
:revision => "06ece1ea8dbeb3bc421e54f907e906cac32038d5"
- head "https://github.com/realm/SwiftLint.git"
+ head "https://github.com/realm/SwiftLint.git", :branch => "nn-single-binary"
bottle do
cellar :any Installing by Homebrew: $ brew install --HEAD swiftlint
==> Cloning https://github.com/realm/SwiftLint.git
Updating /Users/norio/Library/Caches/Homebrew/swiftlint--git
==> Checking out branch nn-single-binary
Synchronizing submodule url for 'Carthage/Checkouts/Nimble'
Synchronizing submodule url for 'Carthage/Checkouts/Quick'
Synchronizing submodule url for 'Carthage/Checkouts/Result'
Synchronizing submodule url for 'Carthage/Checkouts/xcconfigs'
Synchronizing submodule url for 'Externals/Nimble'
Synchronizing submodule url for 'Carthage/Checkouts/Commandant'
Synchronizing submodule url for 'Carthage/Checkouts/Result'
Synchronizing submodule url for 'Carthage/Checkouts/SWXMLHash'
Synchronizing submodule url for 'Carthage/Checkouts/Yams'
Synchronizing submodule url for 'Carthage/Checkouts/xcconfigs'
Synchronizing submodule url for 'Carthage/Checkouts/Nimble'
Synchronizing submodule url for 'Carthage/Checkouts/Quick'
Synchronizing submodule url for 'Carthage/Checkouts/Result'
Synchronizing submodule url for 'Carthage/Checkouts/xcconfigs'
Synchronizing submodule url for 'Externals/Nimble'
==> make prefix_install PREFIX=/usr/local/Cellar/swiftlint/HEAD-745fc95 TEMPORARY_FOLDER=/private/tmp/swiftlint-20171117-4617-12638j/SwiftLint.dst
🍺 /usr/local/Cellar/swiftlint/HEAD-745fc95: 6 files, 15.4MB, built in 3 minutes 33 seconds
brew install --HEAD swiftlint 238.22s user 43.45s system 129% cpu 3:38.13 total |
For now, I am giving up |
Makefile
Outdated
install: uninstall package | ||
sudo installer -pkg SwiftLint.pkg -target / | ||
install: | ||
swift package clean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this go in clean
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this PR, clean
was triggered by install
> package
> installables
> clean
.
I deleted those dependencies considering make install
executing on Linux.
I put swift package clean
here to get closer to the previous behavior, but that may not be necessary here. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we only use test
as a target that uses xcodebuild
, we can change it to somewhat simpler one.
Change `all` target to execute `swift build` instead of `xcodebuild`.
beb3c0a
to
224f44e
Compare
It became unnecessary in Swift 4.0.
Updated. |
This makes `make install` possible on Linux.
Added workaround for SR-6434 on Linux. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌 excellent
Thanks! 🙏 |
Use
swift build --configuration release --static-swift-stdlib
for buildingswiftlint