| ... | ... | @@ -1167,7 +1167,9 @@ pub const LibExeObjStep = struct { |
| 1167 | 1167 | } |
| 1168 | 1168 | switch (self.build_mode) { |
| 1169 | 1169 | builtin.Mode.Debug => { |
| 1170 | | if (!self.disable_libc) { |
| 1170 | if (self.disable_libc) { |
| 1171 | %%args.append("-fno-stack-protector"); |
| 1172 | } else { |
| 1171 | 1173 | %%args.append("-fstack-protector-strong"); |
| 1172 | 1174 | %%args.append("--param"); |
| 1173 | 1175 | %%args.append("ssp-buffer-size=4"); |
| ... | ... | @@ -1175,7 +1177,9 @@ pub const LibExeObjStep = struct { |
| 1175 | 1177 | }, |
| 1176 | 1178 | builtin.Mode.ReleaseSafe => { |
| 1177 | 1179 | %%args.append("-O2"); |
| 1178 | | if (!self.disable_libc) { |
| 1180 | if (self.disable_libc) { |
| 1181 | %%args.append("-fno-stack-protector"); |
| 1182 | } else { |
| 1179 | 1183 | %%args.append("-D_FORTIFY_SOURCE=2"); |
| 1180 | 1184 | %%args.append("-fstack-protector-strong"); |
| 1181 | 1185 | %%args.append("--param"); |
| ... | ... | @@ -1184,6 +1188,7 @@ pub const LibExeObjStep = struct { |
| 1184 | 1188 | }, |
| 1185 | 1189 | builtin.Mode.ReleaseFast => { |
| 1186 | 1190 | %%args.append("-O2"); |
| 1191 | %%args.append("-fno-stack-protector"); |
| 1187 | 1192 | }, |
| 1188 | 1193 | } |
| 1189 | 1194 | |