commit c44f631c72f2bf86df658476eb6449c98d490813 (tree) parent 8c47dda7df2ff123699856eea513a266952b91bf Author: Alex Rønne Petersen <alex@alexrp.com> Date: Sun, 3 Aug 2025 16:22:52 +0200 zig cc: pass -mthumb to the assembler as necessary Diffstat:
| M | src/Compilation.zig | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/Compilation.zig b/src/Compilation.zig @@ -6835,8 +6835,11 @@ pub fn addCCArgs( } } - if (target.cpu.arch.isArm()) { - try argv.append(if (target.cpu.arch.isThumb()) "-mthumb" else "-mno-thumb"); + if (target.cpu.arch.isThumb()) { + try argv.append(switch (ext) { + .assembly, .assembly_with_cpp => "-Wa,-mthumb", + else => "-mthumb", + }); } if (target_util.llvmMachineAbi(target)) |mabi| {