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.
This commit is contained in:
Andrew Kelley
2021-05-14 12:24:47 -07:00
parent 193a926301
commit 8f35c60b39
2 changed files with 7 additions and 3 deletions

View File

@@ -2695,9 +2695,7 @@ pub fn addCCArgs(
try argv.appendSlice(&[_][]const u8{ "-MD", "-MV", "-MF", p });
}
if (target.cpu.arch.isSPARC()) {
// Clang defaults to using the system assembler over the internal one
// when targeting a non-BSD OS.
if (target_util.clangMightShellOutForAssembly(target)) {
try argv.append("-integrated-as");
}

View File

@@ -395,3 +395,9 @@ pub fn libcFullLinkFlags(target: std.Target) []const []const u8 {
},
};
}
pub fn clangMightShellOutForAssembly(target: std.Target) bool {
// Clang defaults to using the system assembler over the internal one
// when targeting a non-BSD OS.
return target.cpu.arch.isSPARC();
}