From b8f85a805bf61ae11d6ee2bd6d8356fbc98ee3ba Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 23 May 2021 16:32:22 -0700 Subject: [PATCH] Revert "stage2: add support for zig cc assembler -mcpu option" This reverts commit afb9f695b1bdbf81185e7d55d5783bcbab880989. I don't think this was ever actually verified to fix the thing it purported to, and it started causing warnings for unused command line parameters. --- src/Compilation.zig | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/Compilation.zig b/src/Compilation.zig index b5daf860eb..9ac8dfcc41 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2943,29 +2943,25 @@ pub fn addCCArgs( try argv.append("-fPIC"); } }, - .shared_library, .ll, .bc, .unknown, .static_library, .object, .zig => {}, - .assembly => { - // Argh, why doesn't the assembler accept the list of CPU features?! - // I don't see a way to do this other than hard coding everything. - switch (target.cpu.arch) { - .riscv32, .riscv64 => { - if (std.Target.riscv.featureSetHas(target.cpu.features, .relax)) { - try argv.append("-mrelax"); - } else { - try argv.append("-mno-relax"); - } - }, - else => { - // TODO - }, - } - if (target.cpu.model.llvm_name) |ln| - try argv.append(try std.fmt.allocPrint(arena, "-mcpu={s}", .{ln})); - }, + .shared_library, .assembly, .ll, .bc, .unknown, .static_library, .object, .zig => {}, } if (out_dep_path) |p| { try argv.appendSlice(&[_][]const u8{ "-MD", "-MV", "-MF", p }); } + // Argh, why doesn't the assembler accept the list of CPU features?! + // I don't see a way to do this other than hard coding everything. + switch (target.cpu.arch) { + .riscv32, .riscv64 => { + if (std.Target.riscv.featureSetHas(target.cpu.features, .relax)) { + try argv.append("-mrelax"); + } else { + try argv.append("-mno-relax"); + } + }, + else => { + // TODO + }, + } if (target_util.clangMightShellOutForAssembly(target)) { try argv.append("-integrated-as");