Skip to content

Commit 771996f

Browse files
kateinoigakukunAnka
authored andcommitted
[wasm][IRGen] HACK: Disable stack protection
This is a temporary workaround until we can update wasi-sdk to version 17 or later, which includes stack protection support in wasi-libc. WebAssembly/wasi-libc@8b7148f
1 parent 05e835e commit 771996f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3397,7 +3397,8 @@ llvm::CallBase *swift::irgen::emitCXXConstructorCall(
33973397

33983398
StackProtectorMode IRGenModule::shouldEmitStackProtector(SILFunction *f) {
33993399
const SILOptions &opts = IRGen.SIL.getOptions();
3400-
return (opts.EnableStackProtection && f->needsStackProtection()) ?
3400+
// FIXME(katei): stack protection support will be added by https://github.com/WebAssembly/wasi-libc/pull/351
3401+
return (opts.EnableStackProtection && f->needsStackProtection() && Triple.getObjectFormat() != llvm::Triple::Wasm) ?
34013402
StackProtectorMode::StackProtector : StackProtectorMode::NoStackProtector;
34023403
}
34033404

0 commit comments

Comments
 (0)