zig cc: pass -mthumb to the assembler as necessary

This commit is contained in:
Alex Rønne Petersen 2025-08-03 16:22:52 +02:00
parent 8c47dda7df
commit c44f631c72
No known key found for this signature in database

View file

@ -6835,8 +6835,11 @@ pub fn addCCArgs(
} }
} }
if (target.cpu.arch.isArm()) { if (target.cpu.arch.isThumb()) {
try argv.append(if (target.cpu.arch.isThumb()) "-mthumb" else "-mno-thumb"); try argv.append(switch (ext) {
.assembly, .assembly_with_cpp => "-Wa,-mthumb",
else => "-mthumb",
});
} }
if (target_util.llvmMachineAbi(target)) |mabi| { if (target_util.llvmMachineAbi(target)) |mabi| {