diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-03-05 19:59:25 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-03-08 03:52:28 +0100 |
| commit | db77e46b4967325cd05aa561979f04514efe1dfa (patch) | |
| tree | 8c3e897c277f79c5e5015fd9cd8faa7f7f41ad3c /src/Compilation.zig | |
| parent | 5765736867f17df63740017a2a842427f046743f (diff) | |
| download | zig-db77e46b4967325cd05aa561979f04514efe1dfa.tar.gz zig-db77e46b4967325cd05aa561979f04514efe1dfa.zip | |
zig cc: Don't pass -mabi for assembly files when targeting arm.
Clang's integrated Arm assembler doesn't understand -mabi yet, so this results
in "unused command line argument" warnings when building musl code and glibc
stubs, for example.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 12221ba3dc..bdb6507921 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -5631,7 +5631,10 @@ pub fn addCCArgs( } if (target_util.llvmMachineAbi(target)) |mabi| { - try argv.append(try std.fmt.allocPrint(arena, "-mabi={s}", .{mabi})); + // Clang's integrated Arm assembler doesn't support `-mabi` yet... + if (!(target.cpu.arch.isArm() and (ext == .assembly or ext == .assembly_with_cpp))) { + try argv.append(try std.fmt.allocPrint(arena, "-mabi={s}", .{mabi})); + } } // We might want to support -mfloat-abi=softfp for Arm and CSKY here in the future. |
