Skip to content

Commit f67943d

Browse files
authored
Use 512KiB of thread stack size for static Linux binaries (#6291)
1 parent a158a42 commit f67943d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ jobs:
145145
- name: Install SDK
146146
run: swift sdk install https://download.swift.org/swift-6.1.2-release/static-sdk/swift-6.1.2-RELEASE/swift-6.1.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum df0b40b9b582598e7e3d70c82ab503fd6fbfdff71fd17e7f1ab37115a0665b3b
147147
- name: Build static binary
148-
run: swift build -c release --product swiftlint --swift-sdk ${{ matrix.swift_sdk }} -Xswiftc -DSWIFTLINT_DISABLE_SOURCEKIT
148+
run: |
149+
swift build \
150+
-c release \
151+
--product swiftlint \
152+
--swift-sdk ${{ matrix.swift_sdk }} \
153+
-Xswiftc -DSWIFTLINT_DISABLE_SOURCEKIT \
154+
-Xlinker -z -Xlinker stack-size=0x80000 # 512KiB
149155
- name: Strip binary
150156
run: strip -s "$BINARY_PATH"
151157
- name: Upload artifact

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@
8383
[nandhinisubbu](https://github.com/nandhinisubbu)
8484
[#6283](https://github.com/realm/SwiftLint/issues/6283)
8585

86+
* `swiftlint-static`, the experimental fully-static Linux binary, now uses 512 KiB
87+
as thread stack size matching Darwin’s size to prevent stack exhaustion.
88+
[ainame](https://github.com/ainame)
89+
[#6287](https://github.com/realm/SwiftLint/pull/6287)
90+
8691
## 0.61.0: Even Fresher Breeze
8792

8893
### Breaking

0 commit comments

Comments
 (0)