Commit 56b416662a

Alex Rønne Petersen <alex@alexrp.com>
2024-11-05 13:04:59
compiler: Update clangMightShellOutForAssembly() for Clang 19.
Clang only uses the system assembler for nvptx and xcore nowadays.
1 parent bd7dda0
Changed files (1)
src/target.zig
@@ -327,9 +327,8 @@ 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();
+    // Clang defaults to using the system assembler in some cases.
+    return target.cpu.arch.isNvptx() or target.cpu.arch == .xcore;
 }
 
 /// Each backend architecture in Clang has a different codepath which may or may not