Skip to content

Commit 2e07cca

Browse files
authored
Wasm: fix stack size flag (no double dash, add -z
The current invocation as is leads to `wasm-ld: error: unknown argument: --stack-size=131072`
1 parent 778208a commit 2e07cca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/SwiftDriver/Jobs/WebAssemblyToolchain+LinkerSupport.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ extension WebAssemblyToolchain {
170170
// workflows like Swift Testing can run within this limited stack space.
171171
let SWIFT_WASM_DEFAULT_STACK_SIZE = 1024 * 128
172172
commandLine.appendFlag(.Xlinker)
173-
commandLine.appendFlag("--stack-size=\(SWIFT_WASM_DEFAULT_STACK_SIZE)")
173+
commandLine.appendFlag("-z")
174+
commandLine.appendFlag(.Xlinker)
175+
commandLine.appendFlag("stack-size=\(SWIFT_WASM_DEFAULT_STACK_SIZE)")
174176

175177
// Delegate to Clang for sanitizers. It will figure out the correct linker
176178
// options.

0 commit comments

Comments
 (0)