diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-08-25 02:44:57 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-08-25 21:59:35 +0200 |
| commit | ade570f0d5cda6c2c515283506ffab85263c0a97 (patch) | |
| tree | f9f2b10d4d19b9ce0087c3a78750e06acec4d3ba /src | |
| parent | 91040b567863e7c068b21d7c6bbf76a1d28a2b2d (diff) | |
| download | zig-ade570f0d5cda6c2c515283506ffab85263c0a97.tar.gz zig-ade570f0d5cda6c2c515283506ffab85263c0a97.zip | |
zig cc: don't pass -mcmodel for assembly files
It does nothing but generate a warning for these.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 0243e74d00..beae1a80da 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -6838,10 +6838,6 @@ pub fn addCCArgs( try argv.append("-municode"); } - if (mod.code_model != .default) { - try argv.append(try std.fmt.allocPrint(arena, "-mcmodel={s}", .{@tagName(mod.code_model)})); - } - try argv.ensureUnusedCapacity(2); switch (comp.config.debug_format) { .strip => {}, @@ -7136,6 +7132,10 @@ pub fn addCCArgs( .ll, .bc, => { + if (mod.code_model != .default) { + try argv.append(try std.fmt.allocPrint(arena, "-mcmodel={s}", .{@tagName(mod.code_model)})); + } + if (target_util.clangSupportsTargetCpuArg(target)) { if (target.cpu.model.llvm_name) |llvm_name| { try argv.appendSlice(&[_][]const u8{ |
