aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/codegen.cpp
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-08-13 21:56:32 +0200
committerGitHub <noreply@github.com>2021-08-13 21:56:32 +0200
commit1373df4c34436b18b570f5b0f1be14da63966557 (patch)
treefb53a6071543007e904ff8a186e0c1bd3a029377 /src/stage1/codegen.cpp
parentc53423f8aac8de49e700ba6eb89ccac462ed2212 (diff)
parent68617c9fb05ad7e92315edb0dec7c5fad56b6265 (diff)
downloadzig-1373df4c34436b18b570f5b0f1be14da63966557.tar.gz
zig-1373df4c34436b18b570f5b0f1be14da63966557.zip
Merge pull request #9227 from mathetake/libc-wasi-test
WASI,libc: fix libstd with wasi-libc linkage, and enable tests.
Diffstat (limited to 'src/stage1/codegen.cpp')
-rw-r--r--src/stage1/codegen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp
index dcb69ca64a..359af18e82 100644
--- a/src/stage1/codegen.cpp
+++ b/src/stage1/codegen.cpp
@@ -582,7 +582,9 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) {
bool want_ssp_attrs = g->build_mode != BuildModeFastRelease &&
g->build_mode != BuildModeSmallRelease &&
- g->link_libc;
+ g->link_libc &&
+ // WASI-libc does not support stack-protector yet.
+ !target_is_wasm(g->zig_target);
if (want_ssp_attrs) {
addLLVMFnAttr(llvm_fn, "sspstrong");
addLLVMFnAttrStr(llvm_fn, "stack-protector-buffer-size", "4");