authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-08-01 17:29:51-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-08-01 20:32:54-07:00
log4d7dd1689fb1e7344fa9e4ca80394369569d0379
treea2292ff3baedc256d78d3057fdf2f2b65ffaf410
parentd370005d344507fc7ca548dcf488d29d3faad865

CLI: stop special-casing LLVM, LLD, and Clang

Before: -fLLVM, -fLLD, -fClang, -flibLLVM -fno-LLVM, -fno-LLD, -fno-Clang, -fno-libLLVM After: -fllvm, -flld, -fclang, -flibllvm -fno-llvm, -fno-lld, -fno-clang, -fno-libllvm

2 files changed, 18 insertions(+), 18 deletions(-)

lib/std/Build/Step/Compile.zig+2-2
......@@ -1339,8 +1339,8 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
13391339 try zig_args.append(try std.fmt.allocPrint(b.allocator, "-freference-trace={d}", .{some}));
13401340 }
13411341
1342 try addFlag(&zig_args, "LLVM", self.use_llvm);
1343 try addFlag(&zig_args, "LLD", self.use_lld);
1342 try addFlag(&zig_args, "llvm", self.use_llvm);
1343 try addFlag(&zig_args, "lld", self.use_lld);
13441344
13451345 if (self.target.ofmt) |ofmt| {
13461346 try zig_args.append(try std.fmt.allocPrint(b.allocator, "-ofmt={s}", .{@tagName(ofmt)}));
src/main.zig+16-16
......@@ -435,12 +435,12 @@ const usage_build_generic =
435435 \\ -fno-dll-export-fns Force-disable marking exported functions as DLL exports
436436 \\ -funwind-tables Always produce unwind table entries for all functions
437437 \\ -fno-unwind-tables Never produce unwind table entries
438 \\ -fLLVM Force using LLVM as the codegen backend
439 \\ -fno-LLVM Prevent using LLVM as the codegen backend
440 \\ -flibLLVM Force using the LLVM API in the codegen backend
441 \\ -fno-libLLVM Prevent using the LLVM API in the codegen backend
442 \\ -fClang Force using Clang as the C/C++ compilation backend
443 \\ -fno-Clang Prevent using Clang as the C/C++ compilation backend
438 \\ -fllvm Force using LLVM as the codegen backend
439 \\ -fno-llvm Prevent using LLVM as the codegen backend
440 \\ -flibllvm Force using the LLVM API in the codegen backend
441 \\ -fno-libllvm Prevent using the LLVM API in the codegen backend
442 \\ -fclang Force using Clang as the C/C++ compilation backend
443 \\ -fno-clang Prevent using Clang as the C/C++ compilation backend
444444 \\ -freference-trace[=num] How many lines of reference trace should be shown per compile error
445445 \\ -fno-reference-trace Disable reference trace
446446 \\ -ferror-tracing Enable error tracing in ReleaseFast mode
......@@ -486,8 +486,8 @@ const usage_build_generic =
486486 \\ --force_undefined [name] Specify the symbol must be defined for the link to succeed
487487 \\ -fsoname[=name] Override the default SONAME value
488488 \\ -fno-soname Disable emitting a SONAME
489 \\ -fLLD Force using LLD as the linker
490 \\ -fno-LLD Prevent using LLD as the linker
489 \\ -flld Force using LLD as the linker
490 \\ -fno-lld Prevent using LLD as the linker
491491 \\ -fcompiler-rt Always include compiler-rt symbols in output
492492 \\ -fno-compiler-rt Prevent including compiler-rt symbols in output
493493 \\ -rdynamic Add all symbols to the dynamic symbol table
......@@ -1262,21 +1262,21 @@ fn buildOutputType(
12621262 want_tsan = true;
12631263 } else if (mem.eql(u8, arg, "-fno-sanitize-thread")) {
12641264 want_tsan = false;
1265 } else if (mem.eql(u8, arg, "-fLLVM")) {
1265 } else if (mem.eql(u8, arg, "-fllvm")) {
12661266 use_llvm = true;
1267 } else if (mem.eql(u8, arg, "-fno-LLVM")) {
1267 } else if (mem.eql(u8, arg, "-fno-llvm")) {
12681268 use_llvm = false;
1269 } else if (mem.eql(u8, arg, "-flibLLVM")) {
1269 } else if (mem.eql(u8, arg, "-flibllvm")) {
12701270 use_lib_llvm = true;
1271 } else if (mem.eql(u8, arg, "-fno-libLLVM")) {
1271 } else if (mem.eql(u8, arg, "-fno-libllvm")) {
12721272 use_lib_llvm = false;
1273 } else if (mem.eql(u8, arg, "-fLLD")) {
1273 } else if (mem.eql(u8, arg, "-flld")) {
12741274 use_lld = true;
1275 } else if (mem.eql(u8, arg, "-fno-LLD")) {
1275 } else if (mem.eql(u8, arg, "-fno-lld")) {
12761276 use_lld = false;
1277 } else if (mem.eql(u8, arg, "-fClang")) {
1277 } else if (mem.eql(u8, arg, "-fclang")) {
12781278 use_clang = true;
1279 } else if (mem.eql(u8, arg, "-fno-Clang")) {
1279 } else if (mem.eql(u8, arg, "-fno-clang")) {
12801280 use_clang = false;
12811281 } else if (mem.eql(u8, arg, "-freference-trace")) {
12821282 reference_trace = 256;