mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
Remove runtime stdlib dependency from pre-built binary targeting Linux
Currently, the pre-built binary targeting Linux links Swift stdlib and core libraries dynamically. Unlike darwin platforms, Swift does not guarantee ABI stability on Linux, so the pre-built binary must be run with exactly the same version of Swift stdlib and core libraries that it was built with on GitHub Actions. And also the shared libraries can be installed in various locations, so users usually need to set `LD_LIBRARY_PATH`. However, asking users to do the above works only for power users. Reducing the runtime dependencies makes it usable for more users.
This commit is contained in:
committed by
Nick Lockwood
parent
ad7707bd34
commit
52c2135353
@@ -18,7 +18,7 @@ jobs:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
- name: Build it
|
||||
run: |
|
||||
swift build --configuration release
|
||||
swift build --configuration release --static-swift-stdlib --enable-dead-strip
|
||||
SWIFTFORMAT_BIN_PATH=`swift build --configuration release --show-bin-path`
|
||||
mv $SWIFTFORMAT_BIN_PATH/swiftformat "${HOME}/swiftformat_linux"
|
||||
- name: 'Upload Artifact'
|
||||
|
||||
Reference in New Issue
Block a user