File tree 2 files changed +3
-2
lines changed 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2896,7 +2896,7 @@ pub fn addCCArgs(
2896
2896
try argv .append ("-D_DEBUG" );
2897
2897
try argv .append ("-Og" );
2898
2898
2899
- if (comp .bin_file .options .link_libc ) {
2899
+ if (comp .bin_file .options .link_libc and target . os . tag != .wasi ) {
2900
2900
try argv .append ("-fstack-protector-strong" );
2901
2901
try argv .append ("--param" );
2902
2902
try argv .append ("ssp-buffer-size=4" );
@@ -2908,7 +2908,7 @@ pub fn addCCArgs(
2908
2908
// See the comment in the BuildModeFastRelease case for why we pass -O2 rather
2909
2909
// than -O3 here.
2910
2910
try argv .append ("-O2" );
2911
- if (comp .bin_file .options .link_libc ) {
2911
+ if (comp .bin_file .options .link_libc and target . os . tag != .wasi ) {
2912
2912
try argv .append ("-D_FORTIFY_SOURCE=2" );
2913
2913
try argv .append ("-fstack-protector-strong" );
2914
2914
try argv .append ("--param" );
Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ fn addCCArgs(
234
234
try args .appendSlice (&[_ ][]const u8 {
235
235
"-std=gnu17" ,
236
236
"-fno-trapping-math" ,
237
+ "-fno-stack-protector" ,
237
238
"-w" , // ignore all warnings
238
239
239
240
o_arg ,
You can’t perform that action at this time.
0 commit comments