mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 05:48:31 +00:00
cc,wasi: do not add stack protector
This commit is contained in:
parent
3a5d0f7700
commit
b63c92f0b9
@ -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");
|
||||
|
||||
@ -234,6 +234,7 @@ fn addCCArgs(
|
||||
try args.appendSlice(&[_][]const u8{
|
||||
"-std=gnu17",
|
||||
"-fno-trapping-math",
|
||||
"-fno-stack-protector",
|
||||
"-w", // ignore all warnings
|
||||
|
||||
o_arg,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user