authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-14 12:24:47-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-14 12:24:47-07:00
log8f35c60b39dad1ecb1609f6105f1e41a52df87ae
tree3038cc131e02853eac05d67fd9ccce7415be43fa
parent193a92630170582c8c7b28432c8a65a80e6ef0b3

stage2: clarify logic of passing `-integrated-as` to clang

make it clear that the logic is only there to lower the amount of noise on the clang command line.

2 files changed, 7 insertions(+), 3 deletions(-)

src/Compilation.zig+1-3
......@@ -2695,9 +2695,7 @@ pub fn addCCArgs(
26952695 try argv.appendSlice(&[_][]const u8{ "-MD", "-MV", "-MF", p });
26962696 }
26972697
2698 if (target.cpu.arch.isSPARC()) {
2699 // Clang defaults to using the system assembler over the internal one
2700 // when targeting a non-BSD OS.
2698 if (target_util.clangMightShellOutForAssembly(target)) {
27012699 try argv.append("-integrated-as");
27022700 }
27032701
src/target.zig+6
......@@ -395,3 +395,9 @@ pub fn libcFullLinkFlags(target: std.Target) []const []const u8 {
395395 },
396396 };
397397}
398
399pub fn clangMightShellOutForAssembly(target: std.Target) bool {
400 // Clang defaults to using the system assembler over the internal one
401 // when targeting a non-BSD OS.
402 return target.cpu.arch.isSPARC();
403}