diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-20 14:08:28 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-20 16:54:00 +0200 |
| commit | b63c92f0b9ce7b3876c5f51e12a6ae249dfa4bac (patch) | |
| tree | 7030b6821267885799a597fa672202af8f21ede8 /src/Compilation.zig | |
| parent | 3a5d0f7700dc28b523e17ba461874b807786b939 (diff) | |
| download | zig-b63c92f0b9ce7b3876c5f51e12a6ae249dfa4bac.tar.gz zig-b63c92f0b9ce7b3876c5f51e12a6ae249dfa4bac.zip | |
cc,wasi: do not add stack protector
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 2af35b7d66..6fd1a2f874 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2896,7 +2896,7 @@ pub fn addCCArgs( try argv.append("-D_DEBUG"); try argv.append("-Og"); - if (comp.bin_file.options.link_libc) { + if (comp.bin_file.options.link_libc and target.os.tag != .wasi) { try argv.append("-fstack-protector-strong"); try argv.append("--param"); try argv.append("ssp-buffer-size=4"); @@ -2908,7 +2908,7 @@ pub fn addCCArgs( // See the comment in the BuildModeFastRelease case for why we pass -O2 rather // than -O3 here. try argv.append("-O2"); - if (comp.bin_file.options.link_libc) { + if (comp.bin_file.options.link_libc and target.os.tag != .wasi) { try argv.append("-D_FORTIFY_SOURCE=2"); try argv.append("-fstack-protector-strong"); try argv.append("--param"); |
