| ... | @@ -5254,17 +5254,10 @@ pub fn addCCArgs( | ... | @@ -5254,17 +5254,10 @@ pub fn addCCArgs( |
| 5254 | try argv.append("-fno-caret-diagnostics"); | 5254 | try argv.append("-fno-caret-diagnostics"); |
| 5255 | } | 5255 | } |
| 5256 | | 5256 | |
| 5257 | if (comp.function_sections) { | 5257 | try argv.append(if (comp.function_sections) "-ffunction-sections" else "-fno-function-sections"); |
| 5258 | try argv.append("-ffunction-sections"); | 5258 | try argv.append(if (comp.data_sections) "-fdata-sections" else "-fno-data-sections"); |
| 5259 | } | | |
| 5260 | | | |
| 5261 | if (comp.data_sections) { | | |
| 5262 | try argv.append("-fdata-sections"); | | |
| 5263 | } | | |
| 5264 | | 5259 | |
| 5265 | if (mod.no_builtin) { | 5260 | try argv.append(if (mod.no_builtin) "-fno-builtin" else "-fbuiltin"); |
| 5266 | try argv.append("-fno-builtin"); | | |
| 5267 | } | | |
| 5268 | | 5261 | |
| 5269 | if (comp.config.link_libcpp) { | 5262 | if (comp.config.link_libcpp) { |
| 5270 | const libcxx_include_path = try std.fs.path.join(arena, &[_][]const u8{ | 5263 | const libcxx_include_path = try std.fs.path.join(arena, &[_][]const u8{ |
| ... | @@ -5482,17 +5475,11 @@ pub fn addCCArgs( | ... | @@ -5482,17 +5475,11 @@ pub fn addCCArgs( |
| 5482 | } | 5475 | } |
| 5483 | } | 5476 | } |
| 5484 | | 5477 | |
| 5485 | if (mod.red_zone) { | 5478 | if (target_util.hasRedZone(target)) { |
| 5486 | try argv.append("-mred-zone"); | 5479 | try argv.append(if (mod.red_zone) "-mred-zone" else "-mno-red-zone"); |
| 5487 | } else if (target_util.hasRedZone(target)) { | | |
| 5488 | try argv.append("-mno-red-zone"); | | |
| 5489 | } | 5480 | } |
| 5490 | | 5481 | |
| 5491 | if (mod.omit_frame_pointer) { | 5482 | try argv.append(if (mod.omit_frame_pointer) "-fomit-frame-pointer" else "-fno-omit-frame-pointer"); |
| 5492 | try argv.append("-fomit-frame-pointer"); | | |
| 5493 | } else { | | |
| 5494 | try argv.append("-fno-omit-frame-pointer"); | | |
| 5495 | } | | |
| 5496 | | 5483 | |
| 5497 | const ssp_buf_size = mod.stack_protector; | 5484 | const ssp_buf_size = mod.stack_protector; |
| 5498 | if (ssp_buf_size != 0) { | 5485 | if (ssp_buf_size != 0) { |
| ... | @@ -5629,8 +5616,8 @@ pub fn addCCArgs( | ... | @@ -5629,8 +5616,8 @@ pub fn addCCArgs( |
| 5629 | try argv.append("-municode"); | 5616 | try argv.append("-municode"); |
| 5630 | } | 5617 | } |
| 5631 | | 5618 | |
| 5632 | if (target.cpu.arch.isThumb()) { | 5619 | if (target.cpu.arch.isArm()) { |
| 5633 | try argv.append("-mthumb"); | 5620 | try argv.append(if (target.cpu.arch.isThumb()) "-mthumb" else "-mno-thumb"); |
| 5634 | } | 5621 | } |
| 5635 | | 5622 | |
| 5636 | if (target_util.supports_fpic(target)) { | 5623 | if (target_util.supports_fpic(target)) { |