From a4eaeee72011a2f7866a18420812178991feaf8d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 21 Mar 2020 10:12:28 -0400 Subject: [PATCH] ability to use `zig cc` as a drop-in C compiler The basics are working --- src-self-hosted/clang_options.zig | 126 + src-self-hosted/clang_options_data.zig | 5632 ++++++++++++++++++++++++ src-self-hosted/stage2.zig | 155 + src/codegen.cpp | 2 +- src/error.cpp | 1 + src/link.cpp | 2 +- src/main.cpp | 56 +- src/stage2.cpp | 12 + src/stage2.h | 31 + tools/process_headers.zig | 22 +- tools/update_clang_options.zig | 274 ++ 11 files changed, 6295 insertions(+), 18 deletions(-) create mode 100644 src-self-hosted/clang_options.zig create mode 100644 src-self-hosted/clang_options_data.zig create mode 100644 tools/update_clang_options.zig diff --git a/src-self-hosted/clang_options.zig b/src-self-hosted/clang_options.zig new file mode 100644 index 0000000000..9fa35b8f9a --- /dev/null +++ b/src-self-hosted/clang_options.zig @@ -0,0 +1,126 @@ +const std = @import("std"); +const mem = std.mem; + +pub const list = @import("clang_options_data.zig").data; + +pub const CliArg = struct { + name: []const u8, + syntax: Syntax, + + /// TODO we're going to want to change this when we start shipping self-hosted because this causes + /// all the functions in stage2.zig to get exported. + zig_equivalent: @import("stage2.zig").ClangArgIterator.ZigEquivalent, + + /// Prefixed by "-" + pd1: bool = false, + + /// Prefixed by "--" + pd2: bool = false, + + /// Prefixed by "/" + psl: bool = false, + + const Syntax = union(enum) { + /// A flag with no values. + flag, + + /// An option which prefixes its (single) value. + joined, + + /// An option which is followed by its value. + separate, + + /// An option which is either joined to its (non-empty) value, or followed by its value. + joined_or_separate, + + /// An option which is both joined to its (first) value, and followed by its (second) value. + joined_and_separate, + + /// An option followed by its values, which are separated by commas. + comma_joined, + + /// An option which consumes an optional joined argument and any other remaining arguments. + remaining_args_joined, + + /// An option which is which takes multiple (separate) arguments. + multi_arg: u8, + }; + + fn matchEql(self: CliArg, arg: []const u8) bool { + if (self.pd1 and arg.len >= self.name.len + 1 and + mem.startsWith(u8, arg, "-") and mem.eql(u8, arg[1..], self.name)) + { + return true; + } + if (self.pd2 and arg.len >= self.name.len + 2 and + mem.startsWith(u8, arg, "--") and mem.eql(u8, arg[2..], self.name)) + { + return true; + } + if (self.psl and arg.len >= self.name.len + 1 and + mem.startsWith(u8, arg, "/") and mem.eql(u8, arg[1..], self.name)) + { + return true; + } + return false; + } + + fn matchStartsWith(self: CliArg, arg: []const u8) usize { + if (self.pd1 and arg.len >= self.name.len + 1 and + mem.startsWith(u8, arg, "-") and mem.startsWith(u8, arg[1..], self.name)) + { + return self.name.len + 1; + } + if (self.pd2 and arg.len >= self.name.len + 2 and + mem.startsWith(u8, arg, "--") and mem.startsWith(u8, arg[2..], self.name)) + { + return self.name.len + 2; + } + if (self.psl and arg.len >= self.name.len + 1 and + mem.startsWith(u8, arg, "/") and mem.startsWith(u8, arg[1..], self.name)) + { + return self.name.len + 1; + } + return 0; + } +}; + +/// Shortcut function for initializing a `CliArg` +pub fn flagpd1(name: []const u8) CliArg { + return .{ + .name = name, + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + }; +} + +/// Shortcut function for initializing a `CliArg` +pub fn joinpd1(name: []const u8) CliArg { + return .{ + .name = name, + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + }; +} + +/// Shortcut function for initializing a `CliArg` +pub fn jspd1(name: []const u8) CliArg { + return .{ + .name = name, + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + }; +} + +/// Shortcut function for initializing a `CliArg` +pub fn sepd1(name: []const u8) CliArg { + return .{ + .name = name, + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = true, + }; +} diff --git a/src-self-hosted/clang_options_data.zig b/src-self-hosted/clang_options_data.zig new file mode 100644 index 0000000000..a88f3583c9 --- /dev/null +++ b/src-self-hosted/clang_options_data.zig @@ -0,0 +1,5632 @@ +// This file is generated by tools/update_clang_options.zig. +// zig fmt: off +usingnamespace @import("clang_options.zig"); +pub const data = blk: { @setEvalBranchQuota(6000); break :blk &[_]CliArg{ +jspd1("A"), +joinpd1("A-"), +jspd1("B"), +flagpd1("C"), +flagpd1("CC"), +jspd1("D"), +flagpd1("E"), +flagpd1("EB"), +flagpd1("EL"), +flagpd1("Eonly"), +jspd1("F"), +jspd1("G"), +joinpd1("G="), +flagpd1("H"), +jspd1("I"), +.{ + .name = "", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = false, + .psl = false, +}, +flagpd1("I-"), +jspd1("J"), +jspd1("L"), +flagpd1("M"), +flagpd1("MD"), +jspd1("MF"), +flagpd1("MG"), +jspd1("MJ"), +flagpd1("MM"), +flagpd1("MMD"), +flagpd1("MP"), +jspd1("MQ"), +jspd1("MT"), +flagpd1("MV"), +flagpd1("Mach"), +joinpd1("O"), +flagpd1("O0"), +flagpd1("O4"), +flagpd1("O"), +flagpd1("ObjC"), +flagpd1("ObjC++"), +joinpd1("Ofast"), +flagpd1("P"), +flagpd1("Q"), +flagpd1("Qn"), +flagpd1("Qunused-arguments"), +flagpd1("Qy"), +joinpd1("R"), +joinpd1("Rpass="), +joinpd1("Rpass-analysis="), +joinpd1("Rpass-missed="), +flagpd1("S"), +jspd1("T"), +jspd1("Tbss"), +jspd1("Tdata"), +jspd1("Ttext"), +jspd1("U"), +.{ + .name = "", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = false, + .psl = false, +}, +jspd1("V"), +flagpd1("WCL4"), +joinpd1("W"), +.{ + .name = "Wa,", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("Wall"), +flagpd1("Wdeprecated"), +joinpd1("Wframe-larger-than="), +.{ + .name = "Wl,", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +joinpd1("Wlarge-by-value-copy="), +flagpd1("Wlarge-by-value-copy"), +joinpd1("Wlarger-than-"), +joinpd1("Wlarger-than="), +flagpd1("Wno-deprecated"), +joinpd1("Wno-nonportable-cfstrings"), +flagpd1("Wno-rewrite-macros"), +flagpd1("Wno-write-strings"), +joinpd1("Wnonportable-cfstrings"), +.{ + .name = "Wp,", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("Wwrite-strings"), +flagpd1("X"), +joinpd1("X"), +sepd1("Xanalyzer"), +.{ + .name = "Xarch_", + .syntax = .joined_and_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +sepd1("Xassembler"), +sepd1("Xclang"), +sepd1("Xcuda-fatbinary"), +sepd1("Xcuda-ptxas"), +sepd1("Xlinker"), +sepd1("Xopenmp-target"), +.{ + .name = "Xopenmp-target=", + .syntax = .joined_and_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +sepd1("Xpreprocessor"), +flagpd1("Z"), +joinpd1("Z"), +flagpd1("Z-Xlinker-no-demangle"), +flagpd1("Z-reserved-lib-cckext"), +flagpd1("Z-reserved-lib-stdc++"), +sepd1("Zlinker-input"), +.{ + .name = "CLASSPATH", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "CLASSPATH=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("###"), +.{ + .name = "AI", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Brepro", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Brepro-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Bt", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Bt+", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "C", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "D", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "E", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "EH", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "EP", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "F", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "FA", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "FA", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "FC", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "FI", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "FR", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "FS", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "FU", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fa", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fd", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fe", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fi", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fm", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fo", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fp", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fr", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Fx", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "G1", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "G2", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GA", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GF", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GF-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GH", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GL", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GL-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GR", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GR-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GS", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GS-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GT", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GX", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GX-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "GZ", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gd", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Ge", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gh", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gm", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gm-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gr", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gregcall", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gs", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gv", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gw", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gw-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gy", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gy-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Gz", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "H", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "HELP", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "I", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "J", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "JMC", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "LD", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "LDd", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "LN", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "MD", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "MDd", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "MP", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "MT", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "MTd", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "O", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "P", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "QIfist", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "?", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qfast_transcendentals", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qimprecise_fwaits", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qpar", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qpar-report", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qsafe_fp_loads", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qspectre", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qvec", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qvec-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Qvec-report", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "RTC", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "TC", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "TP", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Tc", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Tp", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "U", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "V", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "W0", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "W1", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "W2", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "W3", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "W4", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "WL", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "WX", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "WX-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Wall", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Wp64", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "X", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Y-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Yc", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Yd", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Yl", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Yu", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Z7", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "ZH:MD5", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "ZH:SHA1", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "ZH:SHA_256", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "ZI", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "ZW", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Za", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:__cplusplus", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:alignedNew", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:alignedNew-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:auto", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:char8_t", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:char8_t-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:dllexportInlines", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:dllexportInlines-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:forScope", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:inline", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:rvalueCast", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:sizedDealloc", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:sizedDealloc-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:strictStrings", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:ternary", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:threadSafeInit", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:threadSafeInit-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:trigraphs", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:trigraphs-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:twoPhase", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:twoPhase-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zc:wchar_t", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zd", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Ze", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zg", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zi", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zl", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zm", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zo", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zo-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zp", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zp", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Zs", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "analyze-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "arch:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "await", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "bigobj", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "c", + .syntax = .flag, + .zig_equivalent = .c, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "cgthreads", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "clang:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "clr", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "constexpr:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "d1PP", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "d1reportAllClassLayout", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "d2", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "d2FastFail", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "d2Zi+", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "diagnostics:caret", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "diagnostics:classic", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "diagnostics:column", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "doc", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "errorReport", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "execution-charset:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "fallback", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "favor", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "fp:except", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "fp:except-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "fp:fast", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "fp:precise", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "fp:strict", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "guard:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "help", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "homeparams", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "hotpatch", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "imsvc", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "kernel", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "kernel-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "link", + .syntax = .remaining_args_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "nologo", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "o", + .syntax = .joined_or_separate, + .zig_equivalent = .o, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "openmp", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "openmp-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "openmp:experimental", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "permissive-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "sdl", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "sdl-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "showFilenames", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "showFilenames-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "showIncludes", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "source-charset:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "std:", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "u", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "utf-8", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "validate-charset", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "validate-charset-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "vd", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "vmb", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "vmg", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "vmm", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "vms", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "vmv", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "volatile:iso", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "volatile:ms", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "w", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "w", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "wd4005", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "wd4018", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "wd4100", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "wd4910", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "wd4996", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "all-warnings", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "analyze", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "analyzer-no-default-checks", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "analyzer-output", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "assemble", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "assert", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "assert=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "bootclasspath", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "bootclasspath=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "classpath", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "classpath=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "comments", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "comments-in-macros", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "compile", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "constant-cfstrings", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "debug", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "debug=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "define-macro", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "define-macro=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "dependencies", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "dyld-prefix", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "dyld-prefix=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "encoding", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "encoding=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "entry", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "extdirs", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "extdirs=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "extra-warnings", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "for-linker", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "for-linker=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "force-link", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "force-link=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "help-hidden", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "imacros=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-barrier", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-directory", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-directory=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-directory-after", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-directory-after=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-prefix", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-prefix=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-with-prefix", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-with-prefix=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-with-prefix-after", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-with-prefix-after=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-with-prefix-before", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "include-with-prefix-before=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "language", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "language=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "library-directory", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "library-directory=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "mhwdiv", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "mhwdiv=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "migrate", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-line-commands", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-standard-includes", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-standard-libraries", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-undefined", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-warnings", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "optimize", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "optimize=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "output", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "output=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "output-class-directory", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "output-class-directory=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "param", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "param=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "precompile", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "prefix", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "prefix=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "preprocess", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-diagnostic-categories", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-file-name", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-missing-file-dependencies", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-prog-name", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "profile", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "profile-blocks", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "resource", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "resource=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "rtlib", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "serialize-diagnostics", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "signed-char", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "std", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "stdlib", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "sysroot", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "sysroot=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "target-help", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "trace-includes", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "undefine-macro", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "undefine-macro=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "unsigned-char", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "user-dependencies", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "verbose", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "version", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "warn-", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "warn-=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "write-dependencies", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "write-user-dependencies", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +joinpd1("a"), +sepd1("add-plugin"), +flagpd1("faggressive-function-elimination"), +flagpd1("fno-aggressive-function-elimination"), +flagpd1("falign-commons"), +flagpd1("fno-align-commons"), +flagpd1("falign-jumps"), +flagpd1("fno-align-jumps"), +flagpd1("falign-labels"), +flagpd1("fno-align-labels"), +flagpd1("falign-loops"), +flagpd1("fno-align-loops"), +flagpd1("faligned-alloc-unavailable"), +flagpd1("all_load"), +flagpd1("fall-intrinsics"), +flagpd1("fno-all-intrinsics"), +sepd1("allowable_client"), +flagpd1("cfg-add-implicit-dtors"), +flagpd1("unoptimized-cfg"), +flagpd1("analyze"), +sepd1("analyze-function"), +joinpd1("analyze-function="), +sepd1("analyzer-checker"), +joinpd1("analyzer-checker="), +flagpd1("analyzer-checker-help"), +flagpd1("analyzer-checker-help-alpha"), +flagpd1("analyzer-checker-help-developer"), +flagpd1("analyzer-checker-option-help"), +flagpd1("analyzer-checker-option-help-alpha"), +flagpd1("analyzer-checker-option-help-developer"), +sepd1("analyzer-config"), +sepd1("analyzer-config-compatibility-mode"), +joinpd1("analyzer-config-compatibility-mode="), +flagpd1("analyzer-config-help"), +sepd1("analyzer-constraints"), +joinpd1("analyzer-constraints="), +flagpd1("analyzer-disable-all-checks"), +sepd1("analyzer-disable-checker"), +joinpd1("analyzer-disable-checker="), +flagpd1("analyzer-disable-retry-exhausted"), +flagpd1("analyzer-display-progress"), +sepd1("analyzer-dump-egraph"), +joinpd1("analyzer-dump-egraph="), +sepd1("analyzer-inline-max-stack-depth"), +joinpd1("analyzer-inline-max-stack-depth="), +sepd1("analyzer-inlining-mode"), +joinpd1("analyzer-inlining-mode="), +flagpd1("analyzer-list-enabled-checkers"), +sepd1("analyzer-max-loop"), +flagpd1("analyzer-opt-analyze-headers"), +flagpd1("analyzer-opt-analyze-nested-blocks"), +sepd1("analyzer-output"), +joinpd1("analyzer-output="), +sepd1("analyzer-purge"), +joinpd1("analyzer-purge="), +flagpd1("analyzer-stats"), +sepd1("analyzer-store"), +joinpd1("analyzer-store="), +flagpd1("analyzer-viz-egraph-graphviz"), +flagpd1("analyzer-werror"), +flagpd1("fslp-vectorize-aggressive"), +flagpd1("fno-slp-vectorize-aggressive"), +flagpd1("fexpensive-optimizations"), +flagpd1("fno-expensive-optimizations"), +flagpd1("fdefer-pop"), +flagpd1("fno-defer-pop"), +flagpd1("fextended-identifiers"), +flagpd1("fno-extended-identifiers"), +flagpd1("fhonor-infinites"), +flagpd1("fno-honor-infinites"), +flagpd1("findirect-virtual-calls"), +sepd1("fnew-alignment"), +joinpd1("objcmt-white-list-dir-path="), +flagpd1("faligned-new"), +flagpd1("fno-aligned-new"), +flagpd1("fsched-interblock"), +flagpd1("ftree-vectorize"), +flagpd1("fno-tree-vectorize"), +flagpd1("ftree-slp-vectorize"), +flagpd1("fno-tree-slp-vectorize"), +flagpd1("fterminated-vtables"), +flagpd1("grecord-gcc-switches"), +flagpd1("gno-record-gcc-switches"), +flagpd1("fident"), +flagpd1("nocudalib"), +.{ + .name = "system-header-prefix", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-system-header-prefix", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("integrated-as"), +flagpd1("no-integrated-as"), +flagpd1("fkeep-inline-functions"), +flagpd1("fno-keep-inline-functions"), +flagpd1("fno-semantic-interposition"), +.{ + .name = "Gs", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "O1", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "O2", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +flagpd1("fno-ident"), +.{ + .name = "Ob0", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Ob1", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Ob2", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Od", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Og", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Oi", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Oi-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Os", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Ot", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Ox", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +flagpd1("fcuda-rdc"), +.{ + .name = "Oy", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +.{ + .name = "Oy-", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = true, +}, +flagpd1("fno-cuda-rdc"), +flagpd1("shared-libasan"), +flagpd1("frecord-gcc-switches"), +flagpd1("fno-record-gcc-switches"), +.{ + .name = "ansi", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +sepd1("arch"), +flagpd1("arch_errors_fatal"), +sepd1("arch_only"), +flagpd1("arcmt-check"), +flagpd1("arcmt-migrate"), +flagpd1("arcmt-migrate-emit-errors"), +sepd1("arcmt-migrate-report-output"), +flagpd1("arcmt-modify"), +flagpd1("ast-dump"), +joinpd1("ast-dump="), +flagpd1("ast-dump-all"), +joinpd1("ast-dump-all="), +sepd1("ast-dump-filter"), +flagpd1("ast-dump-lookups"), +flagpd1("ast-list"), +sepd1("ast-merge"), +flagpd1("ast-print"), +flagpd1("ast-view"), +.{ + .name = "autocomplete=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("fautomatic"), +flagpd1("fno-automatic"), +sepd1("aux-triple"), +jspd1("b"), +flagpd1("fbackslash"), +flagpd1("fno-backslash"), +flagpd1("fbacktrace"), +flagpd1("fno-backtrace"), +flagpd1("bind_at_load"), +flagpd1("fbounds-check"), +flagpd1("fno-bounds-check"), +flagpd1("fbranch-count-reg"), +flagpd1("fno-branch-count-reg"), +flagpd1("building-pch-with-obj"), +flagpd1("bundle"), +sepd1("bundle_loader"), +.{ + .name = "c", + .syntax = .flag, + .zig_equivalent = .c, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +jspd1("c-isystem"), +flagpd1("fcaller-saves"), +flagpd1("fno-caller-saves"), +flagpd1("cc1"), +flagpd1("cc1as"), +joinpd1("ccc-"), +flagpd1("ccc-arcmt-check"), +sepd1("ccc-arcmt-migrate"), +flagpd1("ccc-arcmt-modify"), +sepd1("ccc-gcc-name"), +sepd1("ccc-install-dir"), +sepd1("ccc-objcmt-migrate"), +flagpd1("ccc-print-bindings"), +flagpd1("ccc-print-phases"), +flagpd1("cfguard"), +flagpd1("cfguard-no-checks"), +sepd1("chain-include"), +flagpd1("fcheck-array-temporaries"), +flagpd1("fno-check-array-temporaries"), +flagpd1("cl-denorms-are-zero"), +.{ + .name = "cl-ext=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("cl-fast-relaxed-math"), +flagpd1("cl-finite-math-only"), +flagpd1("cl-fp32-correctly-rounded-divide-sqrt"), +flagpd1("cl-kernel-arg-info"), +flagpd1("cl-mad-enable"), +flagpd1("cl-no-signed-zeros"), +flagpd1("cl-opt-disable"), +flagpd1("cl-single-precision-constant"), +joinpd1("cl-std="), +flagpd1("cl-strict-aliasing"), +flagpd1("cl-uniform-work-group-size"), +flagpd1("cl-unsafe-math-optimizations"), +jspd1("client_name"), +sepd1("code-completion-at"), +joinpd1("code-completion-at="), +flagpd1("code-completion-brief-comments"), +flagpd1("code-completion-macros"), +flagpd1("code-completion-patterns"), +flagpd1("code-completion-with-fixits"), +.{ + .name = "combine", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +jspd1("compatibility_version"), +flagpd1("compiler-options-dump"), +.{ + .name = "compress-debug-sections", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "compress-debug-sections=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "config", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "config-system-dir=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "config-user-dir=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "coverage", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("coverage-cfg-checksum"), +sepd1("coverage-data-file"), +joinpd1("coverage-data-file="), +flagpd1("coverage-exit-block-before-body"), +flagpd1("coverage-no-function-names-in-data"), +sepd1("coverage-notes-file"), +joinpd1("coverage-notes-file="), +joinpd1("coverage-version="), +flagpd1("cpp"), +flagpd1("cpp-precomp"), +flagpd1("fcray-pointer"), +flagpd1("fno-cray-pointer"), +.{ + .name = "cuda-compile-host-device", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "cuda-device-only", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "cuda-gpu-arch=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "cuda-host-only", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "cuda-include-ptx=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "cuda-noopt-device-debug", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "cuda-path=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "cuda-path-ignore-env", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +jspd1("current_version"), +jspd1("cxx-isystem"), +flagpd1("dA"), +flagpd1("dD"), +flagpd1("dI"), +flagpd1("dM"), +flagpd1("d"), +joinpd1("d"), +flagpd1("fd-lines-as-code"), +flagpd1("fno-d-lines-as-code"), +flagpd1("fd-lines-as-comments"), +flagpd1("fno-d-lines-as-comments"), +flagpd1("dead_strip"), +flagpd1("debug-forward-template-params"), +joinpd1("debug-info-kind="), +flagpd1("debug-info-macro"), +joinpd1("debugger-tuning="), +flagpd1("fdefault-double-8"), +flagpd1("fno-default-double-8"), +sepd1("default-function-attr"), +flagpd1("fdefault-inline"), +flagpd1("fno-default-inline"), +flagpd1("fdefault-integer-8"), +flagpd1("fno-default-integer-8"), +flagpd1("fdefault-real-8"), +flagpd1("fno-default-real-8"), +sepd1("defsym"), +sepd1("dependency-dot"), +sepd1("dependency-file"), +.{ + .name = "dependent-lib=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("detailed-preprocessing-record"), +flagpd1("fdevirtualize"), +flagpd1("fno-devirtualize"), +flagpd1("fdevirtualize-speculatively"), +flagpd1("fno-devirtualize-speculatively"), +sepd1("diagnostic-log-file"), +sepd1("serialize-diagnostic-file"), +flagpd1("disable-O0-optnone"), +flagpd1("disable-free"), +flagpd1("disable-lifetime-markers"), +flagpd1("disable-llvm-optzns"), +flagpd1("disable-llvm-passes"), +flagpd1("disable-llvm-verifier"), +flagpd1("disable-objc-default-synthesize-properties"), +flagpd1("disable-pragma-debug-crash"), +flagpd1("disable-red-zone"), +flagpd1("discard-value-names"), +flagpd1("fdollar-ok"), +flagpd1("fno-dollar-ok"), +.{ + .name = "driver-mode=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("dump-coverage-mapping"), +flagpd1("dump-deserialized-decls"), +flagpd1("fdump-fortran-optimized"), +flagpd1("fno-dump-fortran-optimized"), +flagpd1("fdump-fortran-original"), +flagpd1("fno-dump-fortran-original"), +flagpd1("fdump-parse-tree"), +flagpd1("fno-dump-parse-tree"), +flagpd1("dump-raw-tokens"), +flagpd1("dump-tokens"), +flagpd1("dumpmachine"), +flagpd1("dumpspecs"), +flagpd1("dumpversion"), +flagpd1("dwarf-column-info"), +sepd1("dwarf-debug-flags"), +sepd1("dwarf-debug-producer"), +flagpd1("dwarf-explicit-import"), +flagpd1("dwarf-ext-refs"), +joinpd1("dwarf-version="), +sepd1("dylib_file"), +flagpd1("dylinker"), +jspd1("dylinker_install_name"), +flagpd1("dynamic"), +flagpd1("dynamiclib"), +jspd1("e"), +flagpd1("feliminate-unused-debug-types"), +flagpd1("fno-eliminate-unused-debug-types"), +flagpd1("emit-ast"), +flagpd1("emit-codegen-only"), +flagpd1("emit-header-module"), +flagpd1("emit-html"), +flagpd1("emit-interface-stubs"), +flagpd1("emit-llvm"), +flagpd1("emit-llvm-bc"), +flagpd1("emit-llvm-only"), +flagpd1("emit-llvm-uselists"), +flagpd1("emit-merged-ifs"), +flagpd1("emit-module"), +flagpd1("emit-module-interface"), +flagpd1("emit-obj"), +flagpd1("emit-pch"), +flagpd1("enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang"), +sepd1("error-on-deserialized-decl"), +joinpd1("error-on-deserialized-decl="), +sepd1("exported_symbols_list"), +flagpd1("fexternal-blas"), +flagpd1("fno-external-blas"), +flagpd1("ff2c"), +flagpd1("fno-f2c"), +flagpd1("fPIC"), +flagpd1("fPIE"), +flagpd1("faccess-control"), +joinpd1("faddress-space-map-mangling="), +flagpd1("faddrsig"), +flagpd1("falign-functions"), +joinpd1("falign-functions="), +joinpd1("falign-jumps="), +joinpd1("falign-labels="), +joinpd1("falign-loops="), +flagpd1("faligned-allocation"), +joinpd1("faligned-new="), +flagpd1("fallow-editor-placeholders"), +flagpd1("fallow-half-arguments-and-returns"), +flagpd1("fallow-pch-with-compiler-errors"), +flagpd1("fallow-unsupported"), +flagpd1("faltivec"), +flagpd1("fansi-escape-codes"), +flagpd1("fapple-kext"), +flagpd1("fapple-link-rtlib"), +flagpd1("fapple-pragma-pack"), +flagpd1("fapplication-extension"), +flagpd1("fapply-global-visibility-to-externs"), +flagpd1("fasm"), +flagpd1("fasm-blocks"), +flagpd1("fassociative-math"), +flagpd1("fassume-sane-operator-new"), +flagpd1("fast"), +flagpd1("fastcp"), +flagpd1("fastf"), +flagpd1("fasynchronous-unwind-tables"), +flagpd1("ffat-lto-objects"), +flagpd1("fno-fat-lto-objects"), +flagpd1("fauto-profile"), +joinpd1("fauto-profile="), +flagpd1("fauto-profile-accurate"), +flagpd1("fautolink"), +joinpd1("fblas-matmul-limit="), +flagpd1("fblocks"), +flagpd1("fblocks-runtime-optional"), +joinpd1("fbootclasspath="), +flagpd1("fborland-extensions"), +sepd1("fbracket-depth"), +joinpd1("fbracket-depth="), +joinpd1("fbuild-session-file="), +joinpd1("fbuild-session-timestamp="), +flagpd1("fbuiltin"), +flagpd1("fbuiltin-module-map"), +flagpd1("fcall-saved-x10"), +flagpd1("fcall-saved-x11"), +flagpd1("fcall-saved-x12"), +flagpd1("fcall-saved-x13"), +flagpd1("fcall-saved-x14"), +flagpd1("fcall-saved-x15"), +flagpd1("fcall-saved-x18"), +flagpd1("fcall-saved-x8"), +flagpd1("fcall-saved-x9"), +flagpd1("fcaret-diagnostics"), +sepd1("fcaret-diagnostics-max-lines"), +flagpd1("fcf-protection"), +joinpd1("fcf-protection="), +joinpd1("fcf-runtime-abi="), +flagpd1("fchar8_t"), +joinpd1("fcheck="), +flagpd1("fcheck-new"), +flagpd1("fno-check-new"), +joinpd1("fclang-abi-compat="), +joinpd1("fclasspath="), +joinpd1("fcoarray="), +flagpd1("fcolor-diagnostics"), +.{ + .name = "fcomment-block-commands=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fcommon"), +joinpd1("fcompile-resource="), +flagpd1("fcomplete-member-pointers"), +flagpd1("fconcepts-ts"), +flagpd1("fconst-strings"), +flagpd1("fconstant-cfstrings"), +sepd1("fconstant-string-class"), +joinpd1("fconstant-string-class="), +sepd1("fconstexpr-backtrace-limit"), +joinpd1("fconstexpr-backtrace-limit="), +sepd1("fconstexpr-depth"), +joinpd1("fconstexpr-depth="), +sepd1("fconstexpr-steps"), +joinpd1("fconstexpr-steps="), +flagpd1("fconvergent-functions"), +joinpd1("fconvert="), +flagpd1("fcoroutines-ts"), +flagpd1("fcoverage-mapping"), +joinpd1("fcrash-diagnostics-dir="), +flagpd1("fcreate-profile"), +flagpd1("fcs-profile-generate"), +joinpd1("fcs-profile-generate="), +flagpd1("fcuda-allow-variadic-functions"), +flagpd1("fcuda-approx-transcendentals"), +flagpd1("fcuda-flush-denormals-to-zero"), +sepd1("fcuda-include-gpubinary"), +flagpd1("fcuda-is-device"), +flagpd1("fcuda-short-ptr"), +flagpd1("fcxx-exceptions"), +flagpd1("fcxx-modules"), +flagpd1("fc++-static-destructors"), +flagpd1("fdata-sections"), +sepd1("fdebug-compilation-dir"), +joinpd1("fdebug-compilation-dir="), +joinpd1("fdebug-default-version="), +flagpd1("fdebug-info-for-profiling"), +flagpd1("fdebug-macro"), +flagpd1("fdebug-pass-arguments"), +flagpd1("fdebug-pass-manager"), +flagpd1("fdebug-pass-structure"), +joinpd1("fdebug-prefix-map="), +flagpd1("fdebug-ranges-base-address"), +flagpd1("fdebug-types-section"), +flagpd1("fdebugger-cast-result-to-id"), +flagpd1("fdebugger-objc-literal"), +flagpd1("fdebugger-support"), +flagpd1("fdeclare-opencl-builtins"), +flagpd1("fdeclspec"), +joinpd1("fdefault-calling-conv="), +flagpd1("fdelayed-template-parsing"), +flagpd1("fdelete-null-pointer-checks"), +joinpd1("fdenormal-fp-math="), +joinpd1("fdepfile-entry="), +flagpd1("fdeprecated-macro"), +flagpd1("fdiagnostics-absolute-paths"), +flagpd1("fdiagnostics-color"), +joinpd1("fdiagnostics-color="), +flagpd1("fdiagnostics-fixit-info"), +sepd1("fdiagnostics-format"), +joinpd1("fdiagnostics-format="), +joinpd1("fdiagnostics-hotness-threshold="), +flagpd1("fdiagnostics-parseable-fixits"), +flagpd1("fdiagnostics-print-source-range-info"), +sepd1("fdiagnostics-show-category"), +joinpd1("fdiagnostics-show-category="), +flagpd1("fdiagnostics-show-hotness"), +joinpd1("fdiagnostics-show-location="), +flagpd1("fdiagnostics-show-note-include-stack"), +flagpd1("fdiagnostics-show-option"), +flagpd1("fdiagnostics-show-template-tree"), +flagpd1("fdigraphs"), +flagpd1("fdisable-module-hash"), +flagpd1("fdiscard-value-names"), +flagpd1("fdollars-in-identifiers"), +flagpd1("fdouble-square-bracket-attributes"), +flagpd1("fdump-record-layouts"), +flagpd1("fdump-record-layouts-simple"), +flagpd1("fdump-vtable-layouts"), +flagpd1("fdwarf2-cfi-asm"), +flagpd1("fdwarf-directory-asm"), +flagpd1("fdwarf-exceptions"), +flagpd1("felide-constructors"), +flagpd1("feliminate-unused-debug-symbols"), +flagpd1("fembed-bitcode"), +joinpd1("fembed-bitcode="), +flagpd1("fembed-bitcode-marker"), +flagpd1("femit-all-decls"), +flagpd1("femit-coverage-data"), +flagpd1("femit-coverage-notes"), +flagpd1("femit-debug-entry-values"), +flagpd1("femulated-tls"), +flagpd1("fencode-extended-block-signature"), +joinpd1("fencoding="), +sepd1("ferror-limit"), +joinpd1("ferror-limit="), +flagpd1("fescaping-block-tail-calls"), +flagpd1("fexceptions"), +joinpd1("fexcess-precision="), +joinpd1("fexec-charset="), +flagpd1("fexperimental-isel"), +flagpd1("fexperimental-new-constant-interpreter"), +flagpd1("fexperimental-new-pass-manager"), +joinpd1("fextdirs="), +flagpd1("fexternc-nounwind"), +flagpd1("ffake-address-space-map"), +flagpd1("ffast-math"), +joinpd1("ffile-prefix-map="), +flagpd1("ffine-grained-bitfield-accesses"), +flagpd1("ffinite-math-only"), +joinpd1("ffixed-line-length-"), +flagpd1("ffixed-point"), +flagpd1("ffixed-r19"), +flagpd1("ffixed-r9"), +flagpd1("ffixed-x1"), +flagpd1("ffixed-x10"), +flagpd1("ffixed-x11"), +flagpd1("ffixed-x12"), +flagpd1("ffixed-x13"), +flagpd1("ffixed-x14"), +flagpd1("ffixed-x15"), +flagpd1("ffixed-x16"), +flagpd1("ffixed-x17"), +flagpd1("ffixed-x18"), +flagpd1("ffixed-x19"), +flagpd1("ffixed-x2"), +flagpd1("ffixed-x20"), +flagpd1("ffixed-x21"), +flagpd1("ffixed-x22"), +flagpd1("ffixed-x23"), +flagpd1("ffixed-x24"), +flagpd1("ffixed-x25"), +flagpd1("ffixed-x26"), +flagpd1("ffixed-x27"), +flagpd1("ffixed-x28"), +flagpd1("ffixed-x29"), +flagpd1("ffixed-x3"), +flagpd1("ffixed-x30"), +flagpd1("ffixed-x31"), +flagpd1("ffixed-x4"), +flagpd1("ffixed-x5"), +flagpd1("ffixed-x6"), +flagpd1("ffixed-x7"), +flagpd1("ffixed-x8"), +flagpd1("ffixed-x9"), +flagpd1("ffor-scope"), +flagpd1("fforbid-guard-variables"), +flagpd1("fforce-dwarf-frame"), +flagpd1("fforce-emit-vtables"), +flagpd1("fforce-enable-int128"), +joinpd1("ffp-contract="), +joinpd1("ffp-exception-behavior="), +joinpd1("ffp-model="), +joinpd1("ffpe-trap="), +joinpd1("ffree-line-length-"), +flagpd1("ffreestanding"), +flagpd1("ffunction-sections"), +flagpd1("fgnu89-inline"), +flagpd1("fgnu-inline-asm"), +flagpd1("fgnu-keywords"), +flagpd1("fgnu-runtime"), +joinpd1("fgnuc-version="), +flagpd1("fgpu-allow-device-init"), +flagpd1("fgpu-rdc"), +flagpd1("fheinous-gnu-extensions"), +flagpd1("fhip-dump-offload-linker-script"), +flagpd1("fhip-new-launch-api"), +flagpd1("fhonor-infinities"), +flagpd1("fhonor-nans"), +flagpd1("fhosted"), +sepd1("filelist"), +sepd1("filetype"), +flagpd1("fimplicit-module-maps"), +flagpd1("fimplicit-modules"), +flagpd1("finclude-default-header"), +joinpd1("finit-character="), +joinpd1("finit-integer="), +joinpd1("finit-logical="), +joinpd1("finit-real="), +flagpd1("finline"), +flagpd1("finline-functions"), +flagpd1("finline-hint-functions"), +joinpd1("finline-limit="), +flagpd1("finline-limit"), +flagpd1("fno-inline-limit"), +joinpd1("finput-charset="), +flagpd1("finstrument-function-entry-bare"), +flagpd1("finstrument-functions"), +flagpd1("finstrument-functions-after-inlining"), +flagpd1("fintegrated-as"), +flagpd1("fintegrated-cc1"), +flagpd1("fix-only-warnings"), +flagpd1("fix-what-you-can"), +flagpd1("ffixed-form"), +flagpd1("fno-fixed-form"), +flagpd1("fixit"), +joinpd1("fixit="), +flagpd1("fixit-recompile"), +flagpd1("fixit-to-temporary"), +flagpd1("fjump-tables"), +flagpd1("fkeep-static-consts"), +flagpd1("flat_namespace"), +flagpd1("flax-vector-conversions"), +joinpd1("flax-vector-conversions="), +flagpd1("flimit-debug-info"), +joinpd1("flimited-precision="), +flagpd1("ffloat-store"), +flagpd1("fno-float-store"), +flagpd1("flto"), +joinpd1("flto="), +joinpd1("flto-jobs="), +flagpd1("flto-unit"), +flagpd1("flto-visibility-public-std"), +sepd1("fmacro-backtrace-limit"), +joinpd1("fmacro-backtrace-limit="), +joinpd1("fmacro-prefix-map="), +flagpd1("fmath-errno"), +joinpd1("fmax-array-constructor="), +joinpd1("fmax-errors="), +joinpd1("fmax-stack-var-size="), +joinpd1("fmax-subrecord-length="), +joinpd1("fmax-type-align="), +flagpd1("fmerge-all-constants"), +flagpd1("fmerge-functions"), +sepd1("fmessage-length"), +joinpd1("fmessage-length="), +sepd1("fmodule-feature"), +joinpd1("fmodule-file="), +flagpd1("fmodule-file-deps"), +joinpd1("fmodule-format="), +sepd1("fmodule-implementation-of"), +joinpd1("fmodule-map-file="), +flagpd1("fmodule-map-file-home-is-cwd"), +flagpd1("fmodule-maps"), +sepd1("fmodule-name"), +joinpd1("fmodule-name="), +flagpd1("fmodules"), +joinpd1("fmodules-cache-path="), +flagpd1("fmodules-codegen"), +flagpd1("fmodules-debuginfo"), +flagpd1("fmodules-decluse"), +flagpd1("fmodules-disable-diagnostic-validation"), +joinpd1("fmodules-embed-all-files"), +joinpd1("fmodules-embed-file="), +flagpd1("fmodules-hash-content"), +joinpd1("fmodules-ignore-macro="), +flagpd1("fmodules-local-submodule-visibility"), +joinpd1("fmodules-prune-after="), +joinpd1("fmodules-prune-interval="), +flagpd1("fmodules-search-all"), +flagpd1("fmodules-strict-context-hash"), +flagpd1("fmodules-strict-decluse"), +flagpd1("fmodules-ts"), +sepd1("fmodules-user-build-path"), +flagpd1("fmodules-validate-input-files-content"), +flagpd1("fmodules-validate-once-per-build-session"), +flagpd1("fmodules-validate-system-headers"), +flagpd1("fms-compatibility"), +joinpd1("fms-compatibility-version="), +flagpd1("fms-extensions"), +joinpd1("fms-memptr-rep="), +flagpd1("fms-volatile"), +joinpd1("fmsc-version="), +flagpd1("fmudflap"), +flagpd1("fmudflapth"), +flagpd1("fnative-half-arguments-and-returns"), +flagpd1("fnative-half-type"), +flagpd1("fnested-functions"), +joinpd1("fnew-alignment="), +flagpd1("fnext-runtime"), +flagpd1("fno-PIC"), +flagpd1("fno-PIE"), +flagpd1("fno-access-control"), +flagpd1("fno-addrsig"), +flagpd1("fno-align-functions"), +flagpd1("fno-aligned-allocation"), +flagpd1("fno-allow-editor-placeholders"), +flagpd1("fno-altivec"), +flagpd1("fno-apple-pragma-pack"), +flagpd1("fno-application-extension"), +flagpd1("fno-asm"), +flagpd1("fno-asm-blocks"), +flagpd1("fno-associative-math"), +flagpd1("fno-assume-sane-operator-new"), +flagpd1("fno-asynchronous-unwind-tables"), +flagpd1("fno-auto-profile"), +flagpd1("fno-auto-profile-accurate"), +flagpd1("fno-autolink"), +flagpd1("fno-bitfield-type-align"), +flagpd1("fno-blocks"), +flagpd1("fno-borland-extensions"), +flagpd1("fno-builtin"), +joinpd1("fno-builtin-"), +flagpd1("fno-caret-diagnostics"), +flagpd1("fno-char8_t"), +flagpd1("fno-color-diagnostics"), +flagpd1("fno-common"), +flagpd1("fno-complete-member-pointers"), +flagpd1("fno-concept-satisfaction-caching"), +flagpd1("fno-const-strings"), +flagpd1("fno-constant-cfstrings"), +flagpd1("fno-coroutines-ts"), +flagpd1("fno-coverage-mapping"), +flagpd1("fno-crash-diagnostics"), +flagpd1("fno-cuda-approx-transcendentals"), +flagpd1("fno-cuda-flush-denormals-to-zero"), +flagpd1("fno-cuda-host-device-constexpr"), +flagpd1("fno-cuda-short-ptr"), +flagpd1("fno-cxx-exceptions"), +flagpd1("fno-cxx-modules"), +flagpd1("fno-c++-static-destructors"), +flagpd1("fno-data-sections"), +flagpd1("fno-debug-info-for-profiling"), +flagpd1("fno-debug-macro"), +flagpd1("fno-debug-pass-manager"), +flagpd1("fno-debug-ranges-base-address"), +flagpd1("fno-debug-types-section"), +flagpd1("fno-declspec"), +flagpd1("fno-delayed-template-parsing"), +flagpd1("fno-delete-null-pointer-checks"), +flagpd1("fno-deprecated-macro"), +flagpd1("fno-diagnostics-color"), +flagpd1("fno-diagnostics-fixit-info"), +flagpd1("fno-diagnostics-show-hotness"), +flagpd1("fno-diagnostics-show-note-include-stack"), +flagpd1("fno-diagnostics-show-option"), +flagpd1("fno-diagnostics-use-presumed-location"), +flagpd1("fno-digraphs"), +flagpd1("fno-discard-value-names"), +flagpd1("fno-dllexport-inlines"), +flagpd1("fno-dollars-in-identifiers"), +flagpd1("fno-double-square-bracket-attributes"), +flagpd1("fno-dwarf2-cfi-asm"), +flagpd1("fno-dwarf-directory-asm"), +flagpd1("fno-elide-constructors"), +flagpd1("fno-elide-type"), +flagpd1("fno-eliminate-unused-debug-symbols"), +flagpd1("fno-emulated-tls"), +flagpd1("fno-escaping-block-tail-calls"), +flagpd1("fno-exceptions"), +flagpd1("fno-experimental-isel"), +flagpd1("fno-experimental-new-pass-manager"), +flagpd1("fno-fast-math"), +flagpd1("fno-fine-grained-bitfield-accesses"), +flagpd1("fno-finite-math-only"), +flagpd1("fno-fixed-point"), +flagpd1("fno-for-scope"), +flagpd1("fno-force-dwarf-frame"), +flagpd1("fno-force-emit-vtables"), +flagpd1("fno-force-enable-int128"), +flagpd1("fno-function-sections"), +flagpd1("fno-gnu89-inline"), +flagpd1("fno-gnu-inline-asm"), +flagpd1("fno-gnu-keywords"), +flagpd1("fno-gpu-allow-device-init"), +flagpd1("fno-gpu-rdc"), +flagpd1("fno-hip-new-launch-api"), +flagpd1("fno-honor-infinities"), +flagpd1("fno-honor-nans"), +flagpd1("fno-implicit-module-maps"), +flagpd1("fno-implicit-modules"), +flagpd1("fno-inline"), +flagpd1("fno-inline-functions"), +flagpd1("fno-integrated-as"), +flagpd1("fno-integrated-cc1"), +flagpd1("fno-jump-tables"), +flagpd1("fno-lax-vector-conversions"), +flagpd1("fno-limit-debug-info"), +flagpd1("fno-lto"), +flagpd1("fno-lto-unit"), +flagpd1("fno-math-builtin"), +flagpd1("fno-math-errno"), +flagpd1("fno-max-type-align"), +flagpd1("fno-merge-all-constants"), +flagpd1("fno-module-file-deps"), +flagpd1("fno-module-maps"), +flagpd1("fno-modules"), +flagpd1("fno-modules-decluse"), +flagpd1("fno-modules-error-recovery"), +flagpd1("fno-modules-global-index"), +flagpd1("fno-modules-search-all"), +flagpd1("fno-strict-modules-decluse"), +flagpd1("fno_modules-validate-input-files-content"), +flagpd1("fno-modules-validate-system-headers"), +flagpd1("fno-ms-compatibility"), +flagpd1("fno-ms-extensions"), +flagpd1("fno-objc-arc"), +flagpd1("fno-objc-arc-exceptions"), +flagpd1("fno-objc-convert-messages-to-runtime-calls"), +flagpd1("fno-objc-exceptions"), +flagpd1("fno-objc-infer-related-result-type"), +flagpd1("fno-objc-legacy-dispatch"), +flagpd1("fno-objc-nonfragile-abi"), +flagpd1("fno-objc-weak"), +flagpd1("fno-omit-frame-pointer"), +flagpd1("fno-openmp"), +flagpd1("fno-openmp-cuda-force-full-runtime"), +flagpd1("fno-openmp-cuda-mode"), +flagpd1("fno-openmp-optimistic-collapse"), +flagpd1("fno-openmp-simd"), +flagpd1("fno-operator-names"), +flagpd1("fno-optimize-sibling-calls"), +flagpd1("fno-pack-struct"), +flagpd1("fno-padding-on-unsigned-fixed-point"), +flagpd1("fno-pascal-strings"), +flagpd1("fno-pch-timestamp"), +flagpd1("fno_pch-validate-input-files-content"), +flagpd1("fno-pic"), +flagpd1("fno-pie"), +flagpd1("fno-plt"), +flagpd1("fno-preserve-as-comments"), +flagpd1("fno-profile-arcs"), +flagpd1("fno-profile-generate"), +flagpd1("fno-profile-instr-generate"), +flagpd1("fno-profile-instr-use"), +flagpd1("fno-profile-sample-accurate"), +flagpd1("fno-profile-sample-use"), +flagpd1("fno-profile-use"), +flagpd1("fno-reciprocal-math"), +flagpd1("fno-record-command-line"), +flagpd1("fno-register-global-dtors-with-atexit"), +flagpd1("fno-relaxed-template-template-args"), +flagpd1("fno-reroll-loops"), +flagpd1("fno-rewrite-imports"), +flagpd1("fno-rewrite-includes"), +flagpd1("fno-ropi"), +flagpd1("fno-rounding-math"), +flagpd1("fno-rtlib-add-rpath"), +flagpd1("fno-rtti"), +flagpd1("fno-rtti-data"), +flagpd1("fno-rwpi"), +.{ + .name = "fno-sanitize=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fno-sanitize-address-poison-custom-array-cookie"), +flagpd1("fno-sanitize-address-use-after-scope"), +flagpd1("fno-sanitize-address-use-odr-indicator"), +flagpd1("fno-sanitize-blacklist"), +flagpd1("fno-sanitize-cfi-canonical-jump-tables"), +flagpd1("fno-sanitize-cfi-cross-dso"), +.{ + .name = "fno-sanitize-coverage=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fno-sanitize-link-c++-runtime"), +flagpd1("fno-sanitize-link-runtime"), +flagpd1("fno-sanitize-memory-track-origins"), +flagpd1("fno-sanitize-memory-use-after-dtor"), +flagpd1("fno-sanitize-minimal-runtime"), +flagpd1("fno-sanitize-recover"), +.{ + .name = "fno-sanitize-recover=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fno-sanitize-stats"), +flagpd1("fno-sanitize-thread-atomics"), +flagpd1("fno-sanitize-thread-func-entry-exit"), +flagpd1("fno-sanitize-thread-memory-access"), +.{ + .name = "fno-sanitize-trap=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fno-sanitize-undefined-trap-on-error"), +flagpd1("fno-save-optimization-record"), +flagpd1("fno-short-enums"), +flagpd1("fno-short-wchar"), +flagpd1("fno-show-column"), +flagpd1("fno-show-source-location"), +flagpd1("fno-signaling-math"), +flagpd1("fno-signed-char"), +flagpd1("fno-signed-wchar"), +flagpd1("fno-signed-zeros"), +flagpd1("fno-sized-deallocation"), +flagpd1("fno-slp-vectorize"), +flagpd1("fno-spell-checking"), +flagpd1("fno-split-dwarf-inlining"), +flagpd1("fno-split-lto-unit"), +flagpd1("fno-stack-protector"), +flagpd1("fno-stack-size-section"), +flagpd1("fno-standalone-debug"), +flagpd1("fno-strict-aliasing"), +flagpd1("fno-strict-enums"), +flagpd1("fno-strict-float-cast-overflow"), +flagpd1("fno-strict-overflow"), +flagpd1("fno-strict-return"), +flagpd1("fno-strict-vtable-pointers"), +flagpd1("fno-struct-path-tbaa"), +flagpd1("fno-temp-file"), +flagpd1("fno-threadsafe-statics"), +flagpd1("fno-trapping-math"), +flagpd1("fno-trigraphs"), +flagpd1("fno-unique-section-names"), +flagpd1("fno-unit-at-a-time"), +flagpd1("fno-unroll-loops"), +flagpd1("fno-unsafe-math-optimizations"), +flagpd1("fno-unsigned-char"), +flagpd1("fno-unwind-tables"), +flagpd1("fno-use-cxa-atexit"), +flagpd1("fno-use-init-array"), +flagpd1("fno-use-line-directives"), +flagpd1("fno-validate-pch"), +flagpd1("fno-var-tracking"), +flagpd1("fno-vectorize"), +flagpd1("fno-verbose-asm"), +flagpd1("fno-virtual-function_elimination"), +flagpd1("fno-wchar"), +flagpd1("fno-whole-program-vtables"), +flagpd1("fno-working-directory"), +flagpd1("fno-wrapv"), +flagpd1("fno-zero-initialized-in-bss"), +flagpd1("fno-zvector"), +flagpd1("fnoopenmp-relocatable-target"), +flagpd1("fnoopenmp-use-tls"), +flagpd1("fno-xray-always-emit-customevents"), +flagpd1("fno-xray-always-emit-typedevents"), +flagpd1("fno-xray-instrument"), +flagpd1("fnoxray-link-deps"), +joinpd1("fobjc-abi-version="), +flagpd1("fobjc-arc"), +joinpd1("fobjc-arc-cxxlib="), +flagpd1("fobjc-arc-exceptions"), +flagpd1("fobjc-atdefs"), +flagpd1("fobjc-call-cxx-cdtors"), +flagpd1("fobjc-convert-messages-to-runtime-calls"), +joinpd1("fobjc-dispatch-method="), +flagpd1("fobjc-exceptions"), +flagpd1("fobjc-gc"), +flagpd1("fobjc-gc-only"), +flagpd1("fobjc-infer-related-result-type"), +flagpd1("fobjc-legacy-dispatch"), +flagpd1("fobjc-link-runtime"), +flagpd1("fobjc-new-property"), +flagpd1("fobjc-nonfragile-abi"), +joinpd1("fobjc-nonfragile-abi-version="), +joinpd1("fobjc-runtime="), +flagpd1("fobjc-runtime-has-weak"), +flagpd1("fobjc-sender-dependent-dispatch"), +flagpd1("fobjc-subscripting-legacy-runtime"), +flagpd1("fobjc-weak"), +flagpd1("fomit-frame-pointer"), +flagpd1("fopenmp"), +joinpd1("fopenmp="), +joinpd1("fopenmp-cuda-blocks-per-sm="), +flagpd1("fopenmp-cuda-force-full-runtime"), +flagpd1("fopenmp-cuda-mode"), +joinpd1("fopenmp-cuda-number-of-sm="), +joinpd1("fopenmp-cuda-teams-reduction-recs-num="), +flagpd1("fopenmp-enable-irbuilder"), +sepd1("fopenmp-host-ir-file-path"), +flagpd1("fopenmp-is-device"), +flagpd1("fopenmp-optimistic-collapse"), +flagpd1("fopenmp-relocatable-target"), +flagpd1("fopenmp-simd"), +.{ + .name = "fopenmp-targets=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fopenmp-use-tls"), +joinpd1("fopenmp-version="), +sepd1("foperator-arrow-depth"), +joinpd1("foperator-arrow-depth="), +joinpd1("foptimization-record-file="), +joinpd1("foptimization-record-passes="), +flagpd1("foptimize-sibling-calls"), +flagpd1("force_cpusubtype_ALL"), +flagpd1("force_flat_namespace"), +sepd1("force_load"), +joinpd1("fforce-addr"), +flagpd1("forder-file-instrumentation"), +joinpd1("foutput-class-dir="), +joinpd1("foverride-record-layout="), +flagpd1("fpack-struct"), +joinpd1("fpack-struct="), +flagpd1("fpadding-on-unsigned-fixed-point"), +flagpd1("fparse-all-comments"), +flagpd1("fpascal-strings"), +joinpd1("fpass-plugin="), +joinpd1("fpatchable-function-entry="), +joinpd1("fpatchable-function-entry-offset="), +flagpd1("fpcc-struct-return"), +flagpd1("fpch-preprocess"), +flagpd1("fpch-validate-input-files-content"), +flagpd1("fpic"), +flagpd1("fpie"), +flagpd1("fplt"), +joinpd1("fplugin="), +joinpd1("fprebuilt-module-path="), +flagpd1("fpreserve-as-comments"), +flagpd1("fpreserve-vec3-type"), +flagpd1("fprofile-arcs"), +joinpd1("fprofile-dir="), +joinpd1("fprofile-exclude-files="), +joinpd1("fprofile-filter-files="), +flagpd1("fprofile-generate"), +joinpd1("fprofile-generate="), +flagpd1("fprofile-instr-generate"), +joinpd1("fprofile-instr-generate="), +flagpd1("fprofile-instr-use"), +joinpd1("fprofile-instr-use="), +joinpd1("fprofile-instrument="), +joinpd1("fprofile-instrument-path="), +joinpd1("fprofile-instrument-use-path="), +sepd1("fprofile-remapping-file"), +joinpd1("fprofile-remapping-file="), +flagpd1("fprofile-sample-accurate"), +flagpd1("fprofile-sample-use"), +joinpd1("fprofile-sample-use="), +flagpd1("fprofile-use"), +joinpd1("fprofile-use="), +sepd1("framework"), +joinpd1("frandom-seed="), +flagpd1("freciprocal-math"), +flagpd1("frecord-command-line"), +joinpd1("frecord-marker="), +flagpd1("ffree-form"), +flagpd1("fno-free-form"), +flagpd1("freg-struct-return"), +flagpd1("fregister-global-dtors-with-atexit"), +flagpd1("frelaxed-template-template-args"), +flagpd1("freroll-loops"), +flagpd1("fretain-comments-from-system-headers"), +flagpd1("frewrite-imports"), +flagpd1("frewrite-includes"), +sepd1("frewrite-map-file"), +joinpd1("frewrite-map-file="), +flagpd1("ffriend-injection"), +flagpd1("fno-friend-injection"), +flagpd1("ffrontend-optimize"), +flagpd1("fno-frontend-optimize"), +flagpd1("fropi"), +flagpd1("frounding-math"), +flagpd1("frtlib-add-rpath"), +flagpd1("frtti"), +flagpd1("frwpi"), +.{ + .name = "fsanitize=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +joinpd1("fsanitize-address-field-padding="), +flagpd1("fsanitize-address-globals-dead-stripping"), +flagpd1("fsanitize-address-poison-custom-array-cookie"), +flagpd1("fsanitize-address-use-after-scope"), +flagpd1("fsanitize-address-use-odr-indicator"), +joinpd1("fsanitize-blacklist="), +flagpd1("fsanitize-cfi-canonical-jump-tables"), +flagpd1("fsanitize-cfi-cross-dso"), +flagpd1("fsanitize-cfi-icall-generalize-pointers"), +.{ + .name = "fsanitize-coverage=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fsanitize-coverage-8bit-counters"), +flagpd1("fsanitize-coverage-indirect-calls"), +flagpd1("fsanitize-coverage-inline-8bit-counters"), +flagpd1("fsanitize-coverage-no-prune"), +flagpd1("fsanitize-coverage-pc-table"), +flagpd1("fsanitize-coverage-stack-depth"), +flagpd1("fsanitize-coverage-trace-bb"), +flagpd1("fsanitize-coverage-trace-cmp"), +flagpd1("fsanitize-coverage-trace-div"), +flagpd1("fsanitize-coverage-trace-gep"), +flagpd1("fsanitize-coverage-trace-pc"), +flagpd1("fsanitize-coverage-trace-pc-guard"), +joinpd1("fsanitize-coverage-type="), +joinpd1("fsanitize-hwaddress-abi="), +flagpd1("fsanitize-link-c++-runtime"), +flagpd1("fsanitize-link-runtime"), +flagpd1("fsanitize-memory-track-origins"), +joinpd1("fsanitize-memory-track-origins="), +flagpd1("fsanitize-memory-use-after-dtor"), +flagpd1("fsanitize-minimal-runtime"), +flagpd1("fsanitize-recover"), +.{ + .name = "fsanitize-recover=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fsanitize-stats"), +joinpd1("fsanitize-system-blacklist="), +flagpd1("fsanitize-thread-atomics"), +flagpd1("fsanitize-thread-func-entry-exit"), +flagpd1("fsanitize-thread-memory-access"), +.{ + .name = "fsanitize-trap=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +joinpd1("fsanitize-undefined-strip-path-components="), +flagpd1("fsanitize-undefined-trap-on-error"), +flagpd1("fsave-optimization-record"), +joinpd1("fsave-optimization-record="), +flagpd1("fseh-exceptions"), +flagpd1("fshort-enums"), +flagpd1("fshort-wchar"), +flagpd1("fshow-column"), +joinpd1("fshow-overloads="), +flagpd1("fshow-source-location"), +flagpd1("fsignaling-math"), +flagpd1("fsigned-bitfields"), +flagpd1("fsigned-char"), +flagpd1("fsigned-wchar"), +flagpd1("fsigned-zeros"), +flagpd1("fsized-deallocation"), +flagpd1("fsjlj-exceptions"), +flagpd1("fslp-vectorize"), +flagpd1("fspell-checking"), +sepd1("fspell-checking-limit"), +joinpd1("fspell-checking-limit="), +flagpd1("fsplit-dwarf-inlining"), +flagpd1("fsplit-lto-unit"), +flagpd1("fsplit-stack"), +flagpd1("fstack-protector"), +flagpd1("fstack-protector-all"), +flagpd1("fstack-protector-strong"), +flagpd1("fstack-size-section"), +flagpd1("fstandalone-debug"), +flagpd1("fstrict-aliasing"), +flagpd1("fstrict-enums"), +flagpd1("fstrict-float-cast-overflow"), +flagpd1("fstrict-overflow"), +flagpd1("fstrict-return"), +flagpd1("fstrict-vtable-pointers"), +flagpd1("fstruct-path-tbaa"), +flagpd1("fsycl-is-device"), +joinpd1("fsymbol-partition="), +flagpd1("fsyntax-only"), +sepd1("ftabstop"), +joinpd1("ftabstop="), +sepd1("ftemplate-backtrace-limit"), +joinpd1("ftemplate-backtrace-limit="), +sepd1("ftemplate-depth"), +joinpd1("ftemplate-depth-"), +joinpd1("ftemplate-depth="), +flagpd1("ftest-coverage"), +joinpd1("ftest-module-file-extension="), +joinpd1("fthin-link-bitcode="), +joinpd1("fthinlto-index="), +flagpd1("fthreadsafe-statics"), +flagpd1("ftime-report"), +flagpd1("ftime-trace"), +joinpd1("ftime-trace-granularity="), +joinpd1("ftls-model="), +joinpd1("ftrap-function="), +flagpd1("ftrapping-math"), +flagpd1("ftrapv"), +sepd1("ftrapv-handler"), +joinpd1("ftrapv-handler="), +flagpd1("ftrigraphs"), +joinpd1("ftrivial-auto-var-init="), +sepd1("ftype-visibility"), +sepd1("function-alignment"), +flagpd1("ffunction-attribute-list"), +flagpd1("fno-function-attribute-list"), +flagpd1("funique-section-names"), +flagpd1("funit-at-a-time"), +flagpd1("funknown-anytype"), +flagpd1("funroll-loops"), +flagpd1("funsafe-math-optimizations"), +flagpd1("funsigned-bitfields"), +flagpd1("funsigned-char"), +flagpd1("funwind-tables"), +flagpd1("fuse-cxa-atexit"), +flagpd1("fuse-init-array"), +joinpd1("fuse-ld="), +flagpd1("fuse-line-directives"), +flagpd1("fuse-register-sized-bitfield-access"), +flagpd1("fvalidate-ast-input-files-content"), +joinpd1("fveclib="), +flagpd1("fvectorize"), +flagpd1("fverbose-asm"), +flagpd1("fvirtual-function-elimination"), +sepd1("fvisibility"), +joinpd1("fvisibility="), +flagpd1("fvisibility-global-new-delete-hidden"), +flagpd1("fvisibility-inlines-hidden"), +flagpd1("fvisibility-ms-compat"), +flagpd1("fwasm-exceptions"), +joinpd1("fwchar-type="), +flagpd1("fwhole-program-vtables"), +flagpd1("fwrapv"), +flagpd1("fwritable-strings"), +flagpd1("fxray-always-emit-customevents"), +flagpd1("fxray-always-emit-typedevents"), +jspd1("fxray-always-instrument="), +jspd1("fxray-attr-list="), +jspd1("fxray-instruction-threshold"), +jspd1("fxray-instruction-threshold="), +flagpd1("fxray-instrument"), +jspd1("fxray-instrumentation-bundle="), +flagpd1("fxray-link-deps"), +jspd1("fxray-modes="), +jspd1("fxray-never-instrument="), +flagpd1("fzero-initialized-in-bss"), +flagpd1("fzvector"), +flagpd1("g0"), +flagpd1("g1"), +flagpd1("g2"), +flagpd1("g3"), +flagpd1("g"), +.{ + .name = "gcc-toolchain=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +sepd1("gcc-toolchain"), +flagpd1("gcodeview"), +flagpd1("gcodeview-ghash"), +joinpd1("gcoff"), +flagpd1("gcolumn-info"), +flagpd1("fgcse-after-reload"), +flagpd1("fno-gcse-after-reload"), +flagpd1("fgcse"), +flagpd1("fno-gcse"), +flagpd1("fgcse-las"), +flagpd1("fno-gcse-las"), +flagpd1("fgcse-sm"), +flagpd1("fno-gcse-sm"), +flagpd1("gdwarf"), +flagpd1("gdwarf-2"), +flagpd1("gdwarf-3"), +flagpd1("gdwarf-4"), +flagpd1("gdwarf-5"), +flagpd1("gdwarf-aranges"), +flagpd1("gembed-source"), +sepd1("gen-cdb-fragment-path"), +flagpd1("gen-reproducer"), +flagpd1("gfull"), +flagpd1("ggdb"), +flagpd1("ggdb0"), +flagpd1("ggdb1"), +flagpd1("ggdb2"), +flagpd1("ggdb3"), +flagpd1("ggnu-pubnames"), +flagpd1("ginline-line-tables"), +flagpd1("gline-directives-only"), +flagpd1("gline-tables-only"), +flagpd1("glldb"), +flagpd1("gmlt"), +flagpd1("gmodules"), +flagpd1("gno-codeview-ghash"), +flagpd1("gno-column-info"), +flagpd1("gno-embed-source"), +flagpd1("gno-gnu-pubnames"), +flagpd1("gno-inline-line-tables"), +flagpd1("gno-pubnames"), +flagpd1("gno-record-command-line"), +flagpd1("gno-strict-dwarf"), +flagpd1("fgnu"), +flagpd1("fno-gnu"), +.{ + .name = "gpu-max-threads-per-block=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("gpubnames"), +flagpd1("grecord-command-line"), +flagpd1("gsce"), +flagpd1("gsplit-dwarf"), +joinpd1("gsplit-dwarf="), +joinpd1("gstabs"), +flagpd1("gstrict-dwarf"), +flagpd1("gtoggle"), +flagpd1("gused"), +joinpd1("gvms"), +joinpd1("gxcoff"), +flagpd1("gz"), +joinpd1("gz="), +sepd1("header-include-file"), +joinpd1("headerpad_max_install_names"), +.{ + .name = "help", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "hip-device-lib=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "hip-device-lib-path=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "hip-link", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +jspd1("idirafter"), +jspd1("iframework"), +jspd1("iframeworkwithsysroot"), +.{ + .name = "imacros", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +sepd1("image_base"), +flagpd1("fimplement-inlines"), +flagpd1("fno-implement-inlines"), +flagpd1("fimplicit-none"), +flagpd1("fno-implicit-none"), +flagpd1("fimplicit-templates"), +flagpd1("fno-implicit-templates"), +sepd1("imultilib"), +.{ + .name = "include", + .syntax = .joined_or_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +sepd1("include-pch"), +flagpd1("index-header-map"), +sepd1("init"), +flagpd1("finit-local-zero"), +flagpd1("fno-init-local-zero"), +flagpd1("init-only"), +flagpd1("finline-functions-called-once"), +flagpd1("fno-inline-functions-called-once"), +flagpd1("finline-small-functions"), +flagpd1("fno-inline-small-functions"), +sepd1("install_name"), +flagpd1("finteger-4-integer-8"), +flagpd1("fno-integer-4-integer-8"), +jspd1("interface-stub-version="), +jspd1("internal-externc-isystem"), +jspd1("internal-isystem"), +flagpd1("fintrinsic-modules-path"), +flagpd1("fno-intrinsic-modules-path"), +flagpd1("fipa-cp"), +flagpd1("fno-ipa-cp"), +jspd1("iprefix"), +jspd1("iquote"), +jspd1("isysroot"), +jspd1("isystem"), +jspd1("isystem-after"), +jspd1("ivfsoverlay"), +flagpd1("fivopts"), +flagpd1("fno-ivopts"), +jspd1("iwithprefix"), +jspd1("iwithprefixbefore"), +jspd1("iwithsysroot"), +flagpd1("keep_private_externs"), +.{ + .name = "l", + .syntax = .joined_or_separate, + .zig_equivalent = .l, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +sepd1("lazy_framework"), +sepd1("lazy_library"), +.{ + .name = "libomptarget-nvptx-path=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "linker-option=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +sepd1("load"), +flagpd1("m16"), +flagpd1("m32"), +flagpd1("m3dnow"), +flagpd1("m3dnowa"), +flagpd1("m64"), +flagpd1("m80387"), +joinpd1("mabi="), +flagpd1("mabi=ieeelongdouble"), +flagpd1("mabicalls"), +joinpd1("mabs="), +flagpd1("madx"), +flagpd1("maes"), +sepd1("main-file-name"), +.{ + .name = "malign-branch=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +joinpd1("malign-branch-boundary="), +joinpd1("malign-branch-prefix-size="), +flagpd1("malign-double"), +joinpd1("malign-functions="), +joinpd1("malign-jumps="), +joinpd1("malign-loops="), +flagpd1("maltivec"), +joinpd1("mamdgpu-debugger-abi="), +joinpd1("mappletvos-version-min="), +joinpd1("mappletvsimulator-version-min="), +joinpd1("march="), +flagpd1("marm"), +joinpd1("masm="), +flagpd1("masm-verbose"), +flagpd1("massembler-fatal-warnings"), +flagpd1("massembler-no-warn"), +flagpd1("matomics"), +flagpd1("mavx"), +flagpd1("mavx2"), +flagpd1("mavx512bf16"), +flagpd1("mavx512bitalg"), +flagpd1("mavx512bw"), +flagpd1("mavx512cd"), +flagpd1("mavx512dq"), +flagpd1("mavx512er"), +flagpd1("mavx512f"), +flagpd1("mavx512ifma"), +flagpd1("mavx512pf"), +flagpd1("mavx512vbmi"), +flagpd1("mavx512vbmi2"), +flagpd1("mavx512vl"), +flagpd1("mavx512vnni"), +flagpd1("mavx512vp2intersect"), +flagpd1("mavx512vpopcntdq"), +flagpd1("fmax-identifier-length"), +flagpd1("fno-max-identifier-length"), +flagpd1("mbackchain"), +flagpd1("mbig-endian"), +flagpd1("mbmi"), +flagpd1("mbmi2"), +flagpd1("mbranch-likely"), +joinpd1("mbranch-protection="), +flagpd1("mbranch-target-enforce"), +flagpd1("mbranches-within-32B-boundaries"), +flagpd1("mbulk-memory"), +flagpd1("mcheck-zero-division"), +flagpd1("mcldemote"), +flagpd1("mclflushopt"), +flagpd1("mclwb"), +flagpd1("mclzero"), +joinpd1("mcmodel="), +flagpd1("mcmodel=medany"), +flagpd1("mcmodel=medlow"), +flagpd1("mcmpb"), +flagpd1("mcmse"), +sepd1("mcode-model"), +flagpd1("mcode-object-v3"), +joinpd1("mcompact-branches="), +joinpd1("mconsole"), +flagpd1("mconstant-cfstrings"), +flagpd1("mconstructor-aliases"), +joinpd1("mcpu="), +flagpd1("mcpu=?"), +flagpd1("mcrbits"), +flagpd1("mcrc"), +flagpd1("mcumode"), +flagpd1("mcx16"), +sepd1("mdebug-pass"), +joinpd1("mdefault-build-attributes"), +flagpd1("mdirect-move"), +flagpd1("mdisable-tail-calls"), +joinpd1("mdll"), +flagpd1("mdouble-float"), +flagpd1("mdsp"), +flagpd1("mdspr2"), +joinpd1("mdynamic-no-pic"), +sepd1("meabi"), +flagpd1("membedded-data"), +flagpd1("menable-no-infs"), +flagpd1("menable-no-nans"), +flagpd1("menable-unsafe-fp-math"), +flagpd1("menqcmd"), +flagpd1("fmerge-constants"), +flagpd1("fno-merge-constants"), +flagpd1("mexception-handling"), +flagpd1("mexecute-only"), +flagpd1("mextern-sdata"), +flagpd1("mf16c"), +flagpd1("mfancy-math-387"), +flagpd1("mfentry"), +flagpd1("mfix-and-continue"), +flagpd1("mfix-cortex-a53-835769"), +flagpd1("mfloat128"), +sepd1("mfloat-abi"), +joinpd1("mfloat-abi="), +flagpd1("mfma"), +flagpd1("mfma4"), +flagpd1("mfp32"), +flagpd1("mfp64"), +sepd1("mfpmath"), +joinpd1("mfpmath="), +flagpd1("mfprnd"), +joinpd1("mfpu="), +flagpd1("mfpxx"), +joinpd1("mframe-pointer="), +flagpd1("mfsgsbase"), +flagpd1("mfxsr"), +flagpd1("mgeneral-regs-only"), +flagpd1("mgfni"), +flagpd1("mginv"), +flagpd1("mglibc"), +flagpd1("mglobal-merge"), +flagpd1("mgpopt"), +flagpd1("mhard-float"), +flagpd1("mhvx"), +joinpd1("mhvx="), +joinpd1("mhvx-length="), +flagpd1("mhtm"), +joinpd1("mhwdiv="), +joinpd1("mhwmult="), +flagpd1("miamcu"), +flagpd1("mieee-fp"), +flagpd1("mieee-rnd-near"), +flagpd1("migrate"), +flagpd1("no-finalize-removal"), +flagpd1("no-ns-alloc-error"), +flagpd1("mimplicit-float"), +joinpd1("mimplicit-it="), +flagpd1("mincremental-linker-compatible"), +joinpd1("mindirect-jump="), +flagpd1("minline-all-stringops"), +flagpd1("minvariant-function-descriptors"), +flagpd1("minvpcid"), +joinpd1("mios-simulator-version-min="), +joinpd1("mios-version-min="), +joinpd1("miphoneos-version-min="), +joinpd1("miphonesimulator-version-min="), +flagpd1("mips1"), +flagpd1("mips16"), +flagpd1("mips2"), +flagpd1("mips3"), +flagpd1("mips32"), +flagpd1("mips32r2"), +flagpd1("mips32r3"), +flagpd1("mips32r5"), +flagpd1("mips32r6"), +flagpd1("mips4"), +flagpd1("mips5"), +flagpd1("mips64"), +flagpd1("mips64r2"), +flagpd1("mips64r3"), +flagpd1("mips64r5"), +flagpd1("mips64r6"), +flagpd1("misel"), +flagpd1("mkernel"), +flagpd1("mldc1-sdc1"), +sepd1("mlimit-float-precision"), +sepd1("mlink-bitcode-file"), +sepd1("mlink-builtin-bitcode"), +sepd1("mlink-cuda-bitcode"), +joinpd1("mlinker-version="), +flagpd1("mlittle-endian"), +sepd1("mllvm"), +flagpd1("mlocal-sdata"), +flagpd1("mlong-calls"), +flagpd1("mlong-double-128"), +flagpd1("mlong-double-64"), +flagpd1("mlong-double-80"), +flagpd1("mlongcall"), +flagpd1("mlwp"), +flagpd1("mlzcnt"), +joinpd1("mmacos-version-min="), +joinpd1("mmacosx-version-min="), +flagpd1("mmadd4"), +joinpd1("mmcu="), +flagpd1("mmemops"), +flagpd1("mmfcrf"), +flagpd1("mmfocrf"), +flagpd1("mmicromips"), +flagpd1("mmmx"), +flagpd1("mmovbe"), +flagpd1("mmovdir64b"), +flagpd1("mmovdiri"), +flagpd1("mmpx"), +flagpd1("mms-bitfields"), +flagpd1("mmsa"), +flagpd1("mmt"), +flagpd1("mmultivalue"), +flagpd1("mmutable-globals"), +flagpd1("mmwaitx"), +joinpd1("mnan="), +flagpd1("mno-3dnow"), +flagpd1("mno-3dnowa"), +flagpd1("mno-80387"), +flagpd1("mno-abicalls"), +flagpd1("mno-adx"), +flagpd1("mno-aes"), +flagpd1("mno-altivec"), +flagpd1("mno-atomics"), +flagpd1("mno-avx"), +flagpd1("mno-avx2"), +flagpd1("mno-avx512bf16"), +flagpd1("mno-avx512bitalg"), +flagpd1("mno-avx512bw"), +flagpd1("mno-avx512cd"), +flagpd1("mno-avx512dq"), +flagpd1("mno-avx512er"), +flagpd1("mno-avx512f"), +flagpd1("mno-avx512ifma"), +flagpd1("mno-avx512pf"), +flagpd1("mno-avx512vbmi"), +flagpd1("mno-avx512vbmi2"), +flagpd1("mno-avx512vl"), +flagpd1("mno-avx512vnni"), +flagpd1("mno-avx512vp2intersect"), +flagpd1("mno-avx512vpopcntdq"), +flagpd1("mno-backchain"), +flagpd1("mno-bmi"), +flagpd1("mno-bmi2"), +flagpd1("mno-branch-likely"), +flagpd1("mno-bulk-memory"), +flagpd1("mno-check-zero-division"), +flagpd1("mno-cldemote"), +flagpd1("mno-clflushopt"), +flagpd1("mno-clwb"), +flagpd1("mno-clzero"), +flagpd1("mno-cmpb"), +flagpd1("mno-code-object-v3"), +flagpd1("mno-constant-cfstrings"), +flagpd1("mno-crbits"), +flagpd1("mno-crc"), +flagpd1("mno-cumode"), +flagpd1("mno-cx16"), +joinpd1("mno-default-build-attributes"), +flagpd1("mno-dsp"), +flagpd1("mno-dspr2"), +flagpd1("mno-embedded-data"), +flagpd1("mno-enqcmd"), +flagpd1("mno-exception-handling"), +flagpd1("mnoexecstack"), +flagpd1("mno-execute-only"), +flagpd1("mno-extern-sdata"), +flagpd1("mno-f16c"), +flagpd1("mno-fix-cortex-a53-835769"), +flagpd1("mno-float128"), +flagpd1("mno-fma"), +flagpd1("mno-fma4"), +flagpd1("mno-fprnd"), +flagpd1("mno-fsgsbase"), +flagpd1("mno-fxsr"), +flagpd1("mno-gfni"), +flagpd1("mno-ginv"), +flagpd1("mno-global-merge"), +flagpd1("mno-gpopt"), +flagpd1("mno-hvx"), +flagpd1("mno-htm"), +flagpd1("mno-iamcu"), +flagpd1("mno-implicit-float"), +flagpd1("mno-incremental-linker-compatible"), +flagpd1("mno-inline-all-stringops"), +flagpd1("mno-invariant-function-descriptors"), +flagpd1("mno-invpcid"), +flagpd1("mno-isel"), +flagpd1("mno-ldc1-sdc1"), +flagpd1("mno-local-sdata"), +flagpd1("mno-long-calls"), +flagpd1("mno-longcall"), +flagpd1("mno-lwp"), +flagpd1("mno-lzcnt"), +flagpd1("mno-madd4"), +flagpd1("mno-memops"), +flagpd1("mno-mfcrf"), +flagpd1("mno-mfocrf"), +flagpd1("mno-micromips"), +flagpd1("mno-mips16"), +flagpd1("mno-mmx"), +flagpd1("mno-movbe"), +flagpd1("mno-movdir64b"), +flagpd1("mno-movdiri"), +flagpd1("mno-movt"), +flagpd1("mno-mpx"), +flagpd1("mno-ms-bitfields"), +flagpd1("mno-msa"), +flagpd1("mno-mt"), +flagpd1("mno-multivalue"), +flagpd1("mno-mutable-globals"), +flagpd1("mno-mwaitx"), +flagpd1("mno-neg-immediates"), +flagpd1("mno-nontrapping-fptoint"), +flagpd1("mno-nvj"), +flagpd1("mno-nvs"), +flagpd1("mno-odd-spreg"), +flagpd1("mno-omit-leaf-frame-pointer"), +flagpd1("mno-outline"), +flagpd1("mno-packed-stack"), +flagpd1("mno-packets"), +flagpd1("mno-pascal-strings"), +flagpd1("mno-pclmul"), +flagpd1("mno-pconfig"), +flagpd1("mno-pie-copy-relocations"), +flagpd1("mno-pku"), +flagpd1("mno-popcnt"), +flagpd1("mno-popcntd"), +flagpd1("mno-power8-vector"), +flagpd1("mno-power9-vector"), +flagpd1("mno-prefetchwt1"), +flagpd1("mno-prfchw"), +flagpd1("mno-ptwrite"), +flagpd1("mno-pure-code"), +flagpd1("mno-qpx"), +flagpd1("mno-rdpid"), +flagpd1("mno-rdrnd"), +flagpd1("mno-rdseed"), +flagpd1("mno-red-zone"), +flagpd1("mno-reference-types"), +flagpd1("mno-relax"), +flagpd1("mno-relax-all"), +flagpd1("mno-relax-pic-calls"), +flagpd1("mno-restrict-it"), +flagpd1("mno-retpoline"), +flagpd1("mno-retpoline-external-thunk"), +flagpd1("mno-rtd"), +flagpd1("mno-rtm"), +flagpd1("mno-sahf"), +flagpd1("mno-save-restore"), +flagpd1("mno-sgx"), +flagpd1("mno-sha"), +flagpd1("mno-shstk"), +flagpd1("mno-sign-ext"), +flagpd1("mno-simd128"), +flagpd1("mno-soft-float"), +flagpd1("mno-spe"), +flagpd1("mno-speculative-load-hardening"), +flagpd1("mno-sram-ecc"), +flagpd1("mno-sse"), +flagpd1("mno-sse2"), +flagpd1("mno-sse3"), +flagpd1("mno-sse4"), +flagpd1("mno-sse4.1"), +flagpd1("mno-sse4.2"), +flagpd1("mno-sse4a"), +flagpd1("mno-ssse3"), +flagpd1("mno-stack-arg-probe"), +flagpd1("mno-stackrealign"), +flagpd1("mno-tail-call"), +flagpd1("mno-tbm"), +flagpd1("mno-thumb"), +flagpd1("mno-tls-direct-seg-refs"), +flagpd1("mno-unaligned-access"), +flagpd1("mno-unimplemented-simd128"), +flagpd1("mno-vaes"), +flagpd1("mno-virt"), +flagpd1("mno-vpclmulqdq"), +flagpd1("mno-vsx"), +flagpd1("mno-vx"), +flagpd1("mno-vzeroupper"), +flagpd1("mno-waitpkg"), +flagpd1("mno-warn-nonportable-cfstrings"), +flagpd1("mno-wavefrontsize64"), +flagpd1("mno-wbnoinvd"), +flagpd1("mno-x87"), +flagpd1("mno-xgot"), +flagpd1("mno-xnack"), +flagpd1("mno-xop"), +flagpd1("mno-xsave"), +flagpd1("mno-xsavec"), +flagpd1("mno-xsaveopt"), +flagpd1("mno-xsaves"), +flagpd1("mno-zero-initialized-in-bss"), +flagpd1("mno-zvector"), +flagpd1("mnocrc"), +flagpd1("mno-direct-move"), +flagpd1("mnontrapping-fptoint"), +flagpd1("mnop-mcount"), +flagpd1("mno-crypto"), +flagpd1("mnvj"), +flagpd1("mnvs"), +flagpd1("modd-spreg"), +sepd1("module-dependency-dir"), +flagpd1("module-file-deps"), +flagpd1("module-file-info"), +flagpd1("fmodule-private"), +flagpd1("fno-module-private"), +flagpd1("fmodulo-sched-allow-regmoves"), +flagpd1("fno-modulo-sched-allow-regmoves"), +flagpd1("fmodulo-sched"), +flagpd1("fno-modulo-sched"), +flagpd1("momit-leaf-frame-pointer"), +joinpd1("moslib="), +flagpd1("moutline"), +flagpd1("mpacked-stack"), +flagpd1("mpackets"), +flagpd1("mpascal-strings"), +flagpd1("mpclmul"), +flagpd1("mpconfig"), +flagpd1("mpie-copy-relocations"), +flagpd1("mpku"), +flagpd1("mpopcnt"), +flagpd1("mpopcntd"), +flagpd1("mcrypto"), +flagpd1("mpower8-vector"), +flagpd1("mpower9-vector"), +joinpd1("mprefer-vector-width="), +flagpd1("mprefetchwt1"), +flagpd1("mprfchw"), +flagpd1("mptwrite"), +flagpd1("mpure-code"), +flagpd1("mqdsp6-compat"), +flagpd1("mqpx"), +flagpd1("mrdpid"), +flagpd1("mrdrnd"), +flagpd1("mrdseed"), +flagpd1("mreassociate"), +flagpd1("mrecip"), +.{ + .name = "mrecip=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("mrecord-mcount"), +flagpd1("mred-zone"), +flagpd1("mreference-types"), +sepd1("mregparm"), +joinpd1("mregparm="), +flagpd1("mrelax"), +flagpd1("mrelax-all"), +flagpd1("mrelax-pic-calls"), +.{ + .name = "mrelax-relocations", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +sepd1("mrelocation-model"), +flagpd1("mrestrict-it"), +flagpd1("mretpoline"), +flagpd1("mretpoline-external-thunk"), +flagpd1("mrtd"), +flagpd1("mrtm"), +flagpd1("msahf"), +flagpd1("msave-restore"), +flagpd1("msave-temp-labels"), +flagpd1("msecure-plt"), +flagpd1("msgx"), +flagpd1("msha"), +flagpd1("mshstk"), +flagpd1("msign-ext"), +joinpd1("msign-return-address="), +joinpd1("msign-return-address-key="), +flagpd1("msimd128"), +flagpd1("msingle-float"), +joinpd1("msmall-data-threshold="), +flagpd1("msoft-float"), +flagpd1("mspe"), +flagpd1("mspeculative-load-hardening"), +flagpd1("msram-ecc"), +flagpd1("msse"), +flagpd1("msse2"), +flagpd1("msse3"), +flagpd1("msse4"), +flagpd1("msse4.1"), +flagpd1("msse4.2"), +flagpd1("msse4a"), +flagpd1("mssse3"), +joinpd1("mstack-alignment="), +flagpd1("mstack-arg-probe"), +joinpd1("mstack-probe-size="), +flagpd1("mstackrealign"), +flagpd1("mstrict-align"), +sepd1("mt-migrate-directory"), +flagpd1("mtail-call"), +flagpd1("mtbm"), +sepd1("mthread-model"), +joinpd1("mthreads"), +flagpd1("mthumb"), +flagpd1("mtls-direct-seg-refs"), +joinpd1("mtls-size="), +sepd1("mtp"), +joinpd1("mtp="), +joinpd1("mtune="), +flagpd1("mtune=?"), +joinpd1("mtvos-simulator-version-min="), +joinpd1("mtvos-version-min="), +flagpd1("muclibc"), +flagpd1("multi_module"), +sepd1("multiply_defined"), +sepd1("multiply_defined_unused"), +flagpd1("munaligned-access"), +joinpd1("municode"), +flagpd1("munimplemented-simd128"), +flagpd1("munwind-tables"), +flagpd1("mv5"), +flagpd1("mv55"), +flagpd1("mv60"), +flagpd1("mv62"), +flagpd1("mv65"), +flagpd1("mv66"), +flagpd1("mvaes"), +flagpd1("mvirt"), +flagpd1("mvpclmulqdq"), +flagpd1("mvsx"), +flagpd1("mvx"), +flagpd1("mvzeroupper"), +flagpd1("mwaitpkg"), +flagpd1("mwarn-nonportable-cfstrings"), +joinpd1("mwatchos-simulator-version-min="), +joinpd1("mwatchos-version-min="), +joinpd1("mwatchsimulator-version-min="), +flagpd1("mwavefrontsize64"), +flagpd1("mwbnoinvd"), +joinpd1("mwindows"), +flagpd1("mx32"), +flagpd1("mx87"), +flagpd1("mxgot"), +flagpd1("mxnack"), +flagpd1("mxop"), +flagpd1("mxsave"), +flagpd1("mxsavec"), +flagpd1("mxsaveopt"), +flagpd1("mxsaves"), +flagpd1("mzvector"), +flagpd1("n"), +flagpd1("new-struct-path-tbaa"), +flagpd1("no_dead_strip_inits_and_terms"), +flagpd1("no-canonical-prefixes"), +flagpd1("no-code-completion-globals"), +flagpd1("no-code-completion-ns-level-decls"), +flagpd1("no-cpp-precomp"), +.{ + .name = "no-cuda-gpu-arch=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-cuda-include-ptx=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-cuda-noopt-device-debug", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-cuda-version-check", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("no-emit-llvm-uselists"), +flagpd1("no-implicit-float"), +.{ + .name = "no-integrated-cpp", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "no-pedantic", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("no-pie"), +flagpd1("no-pthread"), +flagpd1("no-struct-path-tbaa"), +.{ + .name = "no-system-header-prefix=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("nobuiltininc"), +flagpd1("nocpp"), +flagpd1("nocudainc"), +flagpd1("nodefaultlibs"), +flagpd1("nofixprebinding"), +flagpd1("nogpulib"), +flagpd1("nolibc"), +flagpd1("nomultidefs"), +flagpd1("fnon-call-exceptions"), +flagpd1("fno-non-call-exceptions"), +flagpd1("nopie"), +flagpd1("noprebind"), +flagpd1("noprofilelib"), +flagpd1("noseglinkedit"), +flagpd1("nostartfiles"), +flagpd1("nostdinc"), +flagpd1("nostdinc++"), +flagpd1("nostdlib"), +flagpd1("nostdlibinc"), +flagpd1("nostdlib++"), +flagpd1("nostdsysteminc"), +.{ + .name = "o", + .syntax = .joined_or_separate, + .zig_equivalent = .o, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +jspd1("objc-isystem"), +flagpd1("objcmt-atomic-property"), +flagpd1("objcmt-migrate-all"), +flagpd1("objcmt-migrate-annotation"), +flagpd1("objcmt-migrate-designated-init"), +flagpd1("objcmt-migrate-instancetype"), +flagpd1("objcmt-migrate-literals"), +flagpd1("objcmt-migrate-ns-macros"), +flagpd1("objcmt-migrate-property"), +flagpd1("objcmt-migrate-property-dot-syntax"), +flagpd1("objcmt-migrate-protocol-conformance"), +flagpd1("objcmt-migrate-readonly-property"), +flagpd1("objcmt-migrate-readwrite-property"), +flagpd1("objcmt-migrate-subscripting"), +flagpd1("objcmt-ns-nonatomic-iosonly"), +flagpd1("objcmt-returns-innerpointer-property"), +joinpd1("objcmt-whitelist-dir-path="), +jspd1("objcxx-isystem"), +flagpd1("object"), +sepd1("opt-record-file"), +sepd1("opt-record-format"), +sepd1("opt-record-passes"), +sepd1("output-asm-variant"), +flagpd1("p"), +flagpd1("fpack-derived"), +flagpd1("fno-pack-derived"), +jspd1("pagezero_size"), +.{ + .name = "pass-exit-codes", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("pch-through-hdrstop-create"), +flagpd1("pch-through-hdrstop-use"), +joinpd1("pch-through-header="), +.{ + .name = "pedantic", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "pedantic-errors", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("fpeel-loops"), +flagpd1("fno-peel-loops"), +flagpd1("fpermissive"), +flagpd1("fno-permissive"), +flagpd1("pg"), +flagpd1("pic-is-pie"), +sepd1("pic-level"), +flagpd1("pie"), +.{ + .name = "pipe", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +sepd1("plugin"), +.{ + .name = "plugin-arg-", + .syntax = .joined_and_separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +joinpd1("preamble-bytes="), +flagpd1("prebind"), +flagpd1("prebind_all_twolevel_modules"), +flagpd1("fprefetch-loop-arrays"), +flagpd1("fno-prefetch-loop-arrays"), +flagpd1("preload"), +flagpd1("print-dependency-directives-minimized-source"), +.{ + .name = "print-effective-triple", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-file-name=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("print-ivar-layout"), +.{ + .name = "print-libgcc-file-name", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-multi-directory", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-multi-lib", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-multi-os-directory", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("print-preamble"), +.{ + .name = "print-prog-name=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-resource-dir", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-search-dirs", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("print-stats"), +.{ + .name = "print-supported-cpus", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "print-target-triple", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("fprintf"), +flagpd1("fno-printf"), +flagpd1("private_bundle"), +flagpd1("fprofile-correction"), +flagpd1("fno-profile-correction"), +flagpd1("fprofile"), +flagpd1("fno-profile"), +flagpd1("fprofile-generate-sampling"), +flagpd1("fno-profile-generate-sampling"), +flagpd1("fprofile-reusedist"), +flagpd1("fno-profile-reusedist"), +flagpd1("fprofile-values"), +flagpd1("fno-profile-values"), +flagpd1("fprotect-parens"), +flagpd1("fno-protect-parens"), +flagpd1("pthread"), +flagpd1("pthreads"), +.{ + .name = "ptxas-path=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("r"), +flagpd1("frange-check"), +flagpd1("fno-range-check"), +flagpd1("rdynamic"), +sepd1("read_only_relocs"), +flagpd1("freal-4-real-10"), +flagpd1("fno-real-4-real-10"), +flagpd1("freal-4-real-16"), +flagpd1("fno-real-4-real-16"), +flagpd1("freal-4-real-8"), +flagpd1("fno-real-4-real-8"), +flagpd1("freal-8-real-10"), +flagpd1("fno-real-8-real-10"), +flagpd1("freal-8-real-16"), +flagpd1("fno-real-8-real-16"), +flagpd1("freal-8-real-4"), +flagpd1("fno-real-8-real-4"), +flagpd1("frealloc-lhs"), +flagpd1("fno-realloc-lhs"), +sepd1("record-command-line"), +flagpd1("frecursive"), +flagpd1("fno-recursive"), +flagpd1("fregs-graph"), +flagpd1("fno-regs-graph"), +flagpd1("relaxed-aliasing"), +.{ + .name = "relocatable-pch", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("remap"), +sepd1("remap-file"), +flagpd1("frename-registers"), +flagpd1("fno-rename-registers"), +flagpd1("freorder-blocks"), +flagpd1("fno-reorder-blocks"), +flagpd1("frepack-arrays"), +flagpd1("fno-repack-arrays"), +sepd1("resource-dir"), +joinpd1("resource-dir="), +flagpd1("rewrite-legacy-objc"), +flagpd1("rewrite-macros"), +flagpd1("rewrite-objc"), +flagpd1("rewrite-test"), +flagpd1("fripa"), +flagpd1("fno-ripa"), +sepd1("rpath"), +.{ + .name = "rsp-quoting=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +.{ + .name = "rtlib=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("s"), +.{ + .name = "save-stats", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "save-stats=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "save-temps", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "save-temps=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("fschedule-insns2"), +flagpd1("fno-schedule-insns2"), +flagpd1("fschedule-insns"), +flagpd1("fno-schedule-insns"), +flagpd1("fsecond-underscore"), +flagpd1("fno-second-underscore"), +.{ + .name = "sectalign", + .syntax = .{ .multi_arg = 3 }, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +.{ + .name = "sectcreate", + .syntax = .{ .multi_arg = 3 }, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +.{ + .name = "sectobjectsymbols", + .syntax = .{ .multi_arg = 2 }, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +.{ + .name = "sectorder", + .syntax = .{ .multi_arg = 3 }, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("fsee"), +flagpd1("fno-see"), +jspd1("seg1addr"), +sepd1("seg_addr_table"), +sepd1("seg_addr_table_filename"), +.{ + .name = "segaddr", + .syntax = .{ .multi_arg = 2 }, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +.{ + .name = "segcreate", + .syntax = .{ .multi_arg = 3 }, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("seglinkedit"), +.{ + .name = "segprot", + .syntax = .{ .multi_arg = 3 }, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +joinpd1("segs_read_"), +sepd1("segs_read_only_addr"), +sepd1("segs_read_write_addr"), +flagpd1("setup-static-analyzer"), +.{ + .name = "shared", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("shared-libgcc"), +flagpd1("shared-libsan"), +flagpd1("show-encoding"), +.{ + .name = "show-includes", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("show-inst"), +flagpd1("fsign-zero"), +flagpd1("fno-sign-zero"), +flagpd1("fsignaling-nans"), +flagpd1("fno-signaling-nans"), +flagpd1("single_module"), +flagpd1("fsingle-precision-constant"), +flagpd1("fno-single-precision-constant"), +flagpd1("fspec-constr-count"), +flagpd1("fno-spec-constr-count"), +.{ + .name = "specs", + .syntax = .separate, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "specs=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +sepd1("split-dwarf-file"), +sepd1("split-dwarf-output"), +flagpd1("split-stacks"), +flagpd1("fstack-arrays"), +flagpd1("fno-stack-arrays"), +flagpd1("fstack-check"), +flagpd1("fno-stack-check"), +sepd1("stack-protector"), +sepd1("stack-protector-buffer-size"), +.{ + .name = "static", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("static-define"), +flagpd1("static-libgcc"), +flagpd1("static-libgfortran"), +flagpd1("static-libsan"), +flagpd1("static-libstdc++"), +flagpd1("static-openmp"), +flagpd1("static-pie"), +joinpd1("stats-file="), +.{ + .name = "std=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +joinpd1("std-default="), +.{ + .name = "stdlib=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +jspd1("stdlib++-isystem"), +flagpd1("fstrength-reduce"), +flagpd1("fno-strength-reduce"), +jspd1("sub_library"), +jspd1("sub_umbrella"), +flagpd1("sys-header-deps"), +.{ + .name = "system-header-prefix=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("t"), +.{ + .name = "target=", + .syntax = .joined, + .zig_equivalent = .target, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +sepd1("target-abi"), +sepd1("target-cpu"), +sepd1("target-feature"), +.{ + .name = "target", + .syntax = .separate, + .zig_equivalent = .target, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +sepd1("target-linker-version"), +joinpd1("target-sdk-version="), +flagpd1("templight-dump"), +flagpd1("test-coverage"), +flagpd1("time"), +flagpd1("ftls-model"), +flagpd1("fno-tls-model"), +flagpd1("ftracer"), +flagpd1("fno-tracer"), +.{ + .name = "traditional", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +.{ + .name = "traditional-cpp", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("ftree-dce"), +flagpd1("fno-tree-dce"), +flagpd1("ftree_loop_im"), +flagpd1("fno-tree_loop_im"), +flagpd1("ftree_loop_ivcanon"), +flagpd1("fno-tree_loop_ivcanon"), +flagpd1("ftree_loop_linear"), +flagpd1("fno-tree_loop_linear"), +flagpd1("ftree-salias"), +flagpd1("fno-tree-salias"), +flagpd1("ftree-ter"), +flagpd1("fno-tree-ter"), +flagpd1("ftree-vectorizer-verbose"), +flagpd1("fno-tree-vectorizer-verbose"), +flagpd1("ftree-vrp"), +flagpd1("fno-tree-vrp"), +.{ + .name = "trigraphs", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("trim-egraph"), +sepd1("triple"), +joinpd1("triple="), +flagpd1("twolevel_namespace"), +flagpd1("twolevel_namespace_hints"), +jspd1("u"), +sepd1("umbrella"), +flagpd1("undef"), +jspd1("undefined"), +flagpd1("funderscoring"), +flagpd1("fno-underscoring"), +sepd1("unexported_symbols_list"), +flagpd1("funroll-all-loops"), +flagpd1("fno-unroll-all-loops"), +flagpd1("funsafe-loop-optimizations"), +flagpd1("fno-unsafe-loop-optimizations"), +flagpd1("funswitch-loops"), +flagpd1("fno-unswitch-loops"), +.{ + .name = "unwindlib=", + .syntax = .joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +flagpd1("fuse-linker-plugin"), +flagpd1("fno-use-linker-plugin"), +flagpd1("v"), +flagpd1("fvariable-expansion-in-unroller"), +flagpd1("fno-variable-expansion-in-unroller"), +flagpd1("fvect-cost-model"), +flagpd1("fno-vect-cost-model"), +flagpd1("vectorize-loops"), +flagpd1("vectorize-slp"), +flagpd1("verify"), +.{ + .name = "verify=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +.{ + .name = "verify-debug-info", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = false, + .pd2 = true, + .psl = false, +}, +flagpd1("verify-ignore-unexpected"), +.{ + .name = "verify-ignore-unexpected=", + .syntax = .comma_joined, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = false, + .psl = false, +}, +flagpd1("verify-pch"), +flagpd1("version"), +.{ + .name = "via-file-asm", + .syntax = .flag, + .zig_equivalent = .other, + .pd1 = true, + .pd2 = true, + .psl = false, +}, +joinpd1("vtordisp-mode="), +flagpd1("w"), +sepd1("weak_framework"), +sepd1("weak_library"), +sepd1("weak_reference_mismatches"), +joinpd1("weak-l"), +flagpd1("fweb"), +flagpd1("fno-web"), +flagpd1("whatsloaded"), +flagpd1("fwhole-file"), +flagpd1("fno-whole-file"), +flagpd1("fwhole-program"), +flagpd1("fno-whole-program"), +flagpd1("whyload"), +jspd1("working-directory"), +joinpd1("working-directory="), +jspd1("x"), +joinpd1("y"), +sepd1("z"), +};}; diff --git a/src-self-hosted/stage2.zig b/src-self-hosted/stage2.zig index 78aa278005..23df042cbe 100644 --- a/src-self-hosted/stage2.zig +++ b/src-self-hosted/stage2.zig @@ -113,6 +113,7 @@ const Error = extern enum { TargetHasNoDynamicLinker, InvalidAbiVersion, InvalidOperatingSystemVersion, + UnknownClangOption, }; const FILE = std.c.FILE; @@ -1215,3 +1216,157 @@ fn convertSlice(slice: [][:0]u8, ptr: *[*][*:0]u8, len: *usize) !void { } ptr.* = new_slice.ptr; } + +const clang_args = @import("clang_options.zig").list; + +// ABI warning +pub const ClangArgIterator = extern struct { + has_next: bool, + zig_equivalent: ZigEquivalent, + only_arg: [*:0]const u8, + second_arg: [*:0]const u8, + other_args_ptr: [*]const [*:0]const u8, + other_args_len: usize, + argv_ptr: [*]const [*:0]const u8, + argv_len: usize, + next_index: usize, + + // ABI warning + pub const ZigEquivalent = extern enum { + target, + o, + c, + other, + positional, + l, + }; + + fn init(argv: []const [*:0]const u8) ClangArgIterator { + return .{ + .next_index = 2, // `zig cc foo` this points to `foo` + .has_next = argv.len > 2, + .zig_equivalent = undefined, + .only_arg = undefined, + .second_arg = undefined, + .other_args_ptr = undefined, + .other_args_len = undefined, + .argv_ptr = argv.ptr, + .argv_len = argv.len, + }; + } + + fn next(self: *ClangArgIterator) !void { + assert(self.has_next); + assert(self.next_index < self.argv_len); + // In this state we know that the parameter we are looking at is a root parameter + // rather than an argument to a parameter. + self.other_args_ptr = self.argv_ptr + self.next_index; + self.other_args_len = 1; // We adjust this value below when necessary. + const arg = mem.span(self.argv_ptr[self.next_index]); + self.next_index += 1; + defer { + if (self.next_index >= self.argv_len) self.has_next = false; + } + + if (!mem.startsWith(u8, arg, "-")) { + self.zig_equivalent = .positional; + self.only_arg = arg.ptr; + return; + } + + find_clang_arg: for (clang_args) |clang_arg| switch (clang_arg.syntax) { + .flag => if (clang_arg.matchEql(arg)) { + self.zig_equivalent = clang_arg.zig_equivalent; + self.only_arg = arg.ptr; + + break :find_clang_arg; + }, + .joined, .comma_joined => { + // Example: --target=foo + const prefix_len = clang_arg.matchStartsWith(arg); + if (prefix_len != 0) { + self.zig_equivalent = clang_arg.zig_equivalent; + self.only_arg = arg.ptr + prefix_len; // This will skip over the "--target=" part. + + break :find_clang_arg; + } + }, + .joined_or_separate => { + // Examples: `-lfoo`, `-l foo` + const prefix_len = clang_arg.matchStartsWith(arg); + if (prefix_len == arg.len) { + if (self.next_index >= self.argv_len) { + std.debug.warn("Expected parameter after '{}'\n", .{arg}); + process.exit(1); + } + self.only_arg = self.argv_ptr[self.next_index]; + self.next_index += 1; + self.other_args_len += 1; + self.zig_equivalent = clang_arg.zig_equivalent; + + break :find_clang_arg; + } else if (prefix_len != 0) { + self.zig_equivalent = clang_arg.zig_equivalent; + self.only_arg = arg.ptr + prefix_len; + + break :find_clang_arg; + } + }, + .joined_and_separate => { + // Example: `-Xopenmp-target=riscv64-linux-unknown foo` + const prefix_len = clang_arg.matchStartsWith(arg); + if (prefix_len != 0) { + self.only_arg = arg.ptr + prefix_len; + if (self.next_index >= self.argv_len) { + std.debug.warn("Expected parameter after '{}'\n", .{arg}); + process.exit(1); + } + self.second_arg = self.argv_ptr[self.next_index]; + self.next_index += 1; + self.other_args_len += 1; + self.zig_equivalent = clang_arg.zig_equivalent; + break :find_clang_arg; + } + }, + .separate => if (clang_arg.matchEql(arg)) { + if (self.next_index >= self.argv_len) { + std.debug.warn("Expected parameter after '{}'\n", .{arg}); + process.exit(1); + } + self.only_arg = self.argv_ptr[self.next_index]; + self.next_index += 1; + self.other_args_len += 1; + self.zig_equivalent = clang_arg.zig_equivalent; + break :find_clang_arg; + }, + .remaining_args_joined => { + const prefix_len = clang_arg.matchStartsWith(arg); + if (prefix_len != 0) { + @panic("TODO"); + } + }, + .multi_arg => if (clang_arg.matchEql(arg)) { + @panic("TODO"); + }, + } + else { + std.debug.warn("Unknown Clang option: '{}'\n", .{arg}); + process.exit(1); + } + } +}; + +export fn stage2_clang_arg_iterator( + result: *ClangArgIterator, + argc: usize, + argv: [*]const [*:0]const u8, +) void { + result.* = ClangArgIterator.init(argv[0..argc]); +} + +export fn stage2_clang_arg_next(it: *ClangArgIterator) Error { + it.next() catch |err| switch (err) { + error.UnknownClangOption => return .UnknownClangOption, + }; + return .None; +} diff --git a/src/codegen.cpp b/src/codegen.cpp index c2ce2ac3eb..7729172c2f 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -9778,7 +9778,7 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) { Termination term; ZigList args = {}; args.append(buf_ptr(self_exe_path)); - args.append("cc"); + args.append("clang"); Buf *out_dep_path = buf_sprintf("%s.d", buf_ptr(out_obj_path)); add_cc_args(g, args, buf_ptr(out_dep_path), false); diff --git a/src/error.cpp b/src/error.cpp index 2e92a98217..c246ea5f31 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -83,6 +83,7 @@ const char *err_str(Error err) { case ErrorTargetHasNoDynamicLinker: return "target has no dynamic linker"; case ErrorInvalidAbiVersion: return "invalid C ABI version"; case ErrorInvalidOperatingSystemVersion: return "invalid operating system version"; + case ErrorUnknownClangOption: return "unknown Clang option"; } return "(invalid error)"; } diff --git a/src/link.cpp b/src/link.cpp index 0ae47c8432..b340206b14 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -2008,7 +2008,7 @@ static const char *get_def_lib(CodeGen *parent, const char *name, Buf *def_in_fi ZigList args = {}; args.append(buf_ptr(self_exe_path)); - args.append("cc"); + args.append("clang"); args.append("-x"); args.append("c"); args.append(buf_ptr(def_in_file)); diff --git a/src/main.cpp b/src/main.cpp index 76d6eadb14..f850b0bc47 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,7 +36,7 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) { " build-lib [source] create library from source or object files\n" " build-obj [source] create object from source or assembly\n" " builtin show the source code of @import(\"builtin\")\n" - " cc C compiler\n" + " cc use Zig as a drop-in C compiler\n" " fmt parse files and render in canonical zig format\n" " id print the base64-encoded compiler id\n" " init-exe initialize a `zig build` application in the cwd\n" @@ -271,7 +271,7 @@ static int main0(int argc, char **argv) { return 0; } - if (argc >= 2 && (strcmp(argv[1], "cc") == 0 || + if (argc >= 2 && (strcmp(argv[1], "clang") == 0 || strcmp(argv[1], "-cc1") == 0 || strcmp(argv[1], "-cc1as") == 0)) { return ZigClang_main(argc, argv); @@ -575,9 +575,55 @@ static int main0(int argc, char **argv) { return (term.how == TerminationIdClean) ? term.code : -1; } else if (argc >= 2 && strcmp(argv[1], "fmt") == 0) { return stage2_fmt(argc, argv); - } - - for (int i = 1; i < argc; i += 1) { + } else if (argc >= 2 && strcmp(argv[1], "cc") == 0) { + const char *o_arg = nullptr; + bool c_arg = false; + Stage2ClangArgIterator it; + stage2_clang_arg_iterator(&it, argc, argv); + while (it.has_next) { + if ((err = stage2_clang_arg_next(&it))) { + fprintf(stderr, "unable to parse command line parameters: %s\n", err_str(err)); + return EXIT_FAILURE; + } + switch (it.kind) { + case Stage2ClangArgTarget: // example: -target riscv64-linux-unknown + target_string = it.only_arg; + break; + case Stage2ClangArgO: // -o + o_arg = it.only_arg; + break; + case Stage2ClangArgC: // -c + c_arg = true; + break; + case Stage2ClangArgOther: + for (size_t i = 0; i < it.other_args_len; i += 1) { + clang_argv.append(it.other_args_ptr[i]); + } + break; + case Stage2ClangArgPositional: { + CFile *c_file = heap::c_allocator.create(); + c_file->source_path = it.only_arg; + c_source_files.append(c_file); + break; + } + case Stage2ClangArgL: // -l + if (strcmp(it.only_arg, "c") == 0) + have_libc = true; + link_libs.append(it.only_arg); + break; + } + } + if (!c_arg) { + cmd = CmdBuild; + out_type = OutTypeExe; + if (o_arg == nullptr) { + zig_panic("TODO set out name to a.out"); + } + } else { + cmd = CmdBuild; + out_type = OutTypeObj; + } + } else for (int i = 1; i < argc; i += 1) { char *arg = argv[i]; if (arg[0] == '-') { diff --git a/src/stage2.cpp b/src/stage2.cpp index a8d8b7cf97..c83b1aa77c 100644 --- a/src/stage2.cpp +++ b/src/stage2.cpp @@ -304,3 +304,15 @@ enum Error stage2_detect_native_paths(struct Stage2NativePaths *native_paths) { return ErrorNone; } + +void stage2_clang_arg_iterator(struct Stage2ClangArgIterator *it, + size_t argc, char **argv) +{ + const char *msg = "stage0 called stage2_clang_arg_iterator"; + stage2_panic(msg, strlen(msg)); +} + +enum Error stage2_clang_arg_next(struct Stage2ClangArgIterator *it) { + const char *msg = "stage0 called stage2_clang_arg_next"; + stage2_panic(msg, strlen(msg)); +} diff --git a/src/stage2.h b/src/stage2.h index 9ba7e062b1..2abdc4c513 100644 --- a/src/stage2.h +++ b/src/stage2.h @@ -105,6 +105,7 @@ enum Error { ErrorTargetHasNoDynamicLinker, ErrorInvalidAbiVersion, ErrorInvalidOperatingSystemVersion, + ErrorUnknownClangOption, }; // ABI warning @@ -316,4 +317,34 @@ struct Stage2NativePaths { // ABI warning ZIG_EXTERN_C enum Error stage2_detect_native_paths(struct Stage2NativePaths *native_paths); +// ABI warning +enum Stage2ClangArg { + Stage2ClangArgTarget, + Stage2ClangArgO, + Stage2ClangArgC, + Stage2ClangArgOther, + Stage2ClangArgPositional, + Stage2ClangArgL, +}; + +// ABI warning +struct Stage2ClangArgIterator { + bool has_next; + enum Stage2ClangArg kind; + const char *only_arg; + const char *second_arg; + const char **other_args_ptr; + size_t other_args_len; + const char **argv_ptr; + size_t argv_len; + size_t next_index; +}; + +// ABI warning +ZIG_EXTERN_C void stage2_clang_arg_iterator(struct Stage2ClangArgIterator *it, + size_t argc, char **argv); + +// ABI warning +ZIG_EXTERN_C enum Error stage2_clang_arg_next(struct Stage2ClangArgIterator *it); + #endif diff --git a/tools/process_headers.zig b/tools/process_headers.zig index abdc9fabf9..7c9befcffa 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -1,14 +1,14 @@ -// To get started, run this tool with no args and read the help message. -// -// The build systems of musl-libc and glibc require specifying a single target -// architecture. Meanwhile, Zig supports out-of-the-box cross compilation for -// every target. So the process to create libc headers that Zig ships is to use -// this tool. -// First, use the musl/glibc build systems to create installations of all the -// targets in the `glibc_targets`/`musl_targets` variables. -// Next, run this tool to create a new directory which puts .h files into -// subdirectories, with `generic` being files that apply to all architectures. -// You'll then have to manually update Zig source repo with these new files. +//! To get started, run this tool with no args and read the help message. +//! +//! The build systems of musl-libc and glibc require specifying a single target +//! architecture. Meanwhile, Zig supports out-of-the-box cross compilation for +//! every target. So the process to create libc headers that Zig ships is to use +//! this tool. +//! First, use the musl/glibc build systems to create installations of all the +//! targets in the `glibc_targets`/`musl_targets` variables. +//! Next, run this tool to create a new directory which puts .h files into +//! subdirectories, with `generic` being files that apply to all architectures. +//! You'll then have to manually update Zig source repo with these new files. const std = @import("std"); const Arch = std.Target.Cpu.Arch; diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig new file mode 100644 index 0000000000..863c67b68d --- /dev/null +++ b/tools/update_clang_options.zig @@ -0,0 +1,274 @@ +//! To get started, run this tool with no args and read the help message. +//! +//! Clang has a file "options.td" which describes all of its command line parameter options. +//! When using `zig cc`, Zig acts as a proxy between the user and Clang. It does not need +//! to understand all the parameters, but it does need to understand some of them, such as +//! the target. This means that Zig must understand when a C command line parameter expects +//! to "consume" the next parameter on the command line. +//! +//! For example, `-z -target` would mean to pass `-target` to the linker, whereas `-E -target` +//! would mean that the next parameter specifies the target. + +const std = @import("std"); +const fs = std.fs; +const assert = std.debug.assert; +const json = std.json; + +const KnownOpt = struct { + name: []const u8, + + /// Corresponds to stage.zig ClangArgIterator.Kind + ident: []const u8, +}; + +const known_options = [_]KnownOpt{ + .{ + .name = "target", + .ident = "target", + }, + .{ + .name = "o", + .ident = "o", + }, + .{ + .name = "c", + .ident = "c", + }, + .{ + .name = "l", + .ident = "l", + }, +}; + +const blacklisted_options = [_][]const u8{}; + +fn knownOption(name: []const u8) ?[]const u8 { + const chopped_name = if (std.mem.endsWith(u8, name, "=")) name[0 .. name.len - 1] else name; + for (known_options) |item| { + if (std.mem.eql(u8, chopped_name, item.name)) { + return item.ident; + } + } + return null; +} + +pub fn main() anyerror!void { + var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); + defer arena.deinit(); + + const allocator = &arena.allocator; + const args = try std.process.argsAlloc(allocator); + + if (args.len <= 1) { + usageAndExit(std.io.getStdErr(), args[0], 1); + } + if (std.mem.eql(u8, args[1], "--help")) { + usageAndExit(std.io.getStdOut(), args[0], 0); + } + if (args.len < 3) { + usageAndExit(std.io.getStdErr(), args[0], 1); + } + + const llvm_tblgen_exe = args[1]; + if (std.mem.startsWith(u8, llvm_tblgen_exe, "-")) { + usageAndExit(std.io.getStdErr(), args[0], 1); + } + + const llvm_src_root = args[2]; + if (std.mem.startsWith(u8, llvm_src_root, "-")) { + usageAndExit(std.io.getStdErr(), args[0], 1); + } + + const child_args = [_][]const u8{ + llvm_tblgen_exe, + "--dump-json", + try std.fmt.allocPrint(allocator, "{}/clang/include/clang/Driver/Options.td", .{llvm_src_root}), + try std.fmt.allocPrint(allocator, "-I={}/llvm/include", .{llvm_src_root}), + try std.fmt.allocPrint(allocator, "-I={}/clang/include/clang/Driver", .{llvm_src_root}), + }; + + const child_result = try std.ChildProcess.exec2(.{ + .allocator = allocator, + .argv = &child_args, + .max_output_bytes = 100 * 1024 * 1024, + }); + + std.debug.warn("{}\n", .{child_result.stderr}); + + const json_text = switch (child_result.term) { + .Exited => |code| if (code == 0) child_result.stdout else { + std.debug.warn("llvm-tblgen exited with code {}\n", .{code}); + std.process.exit(1); + }, + else => { + std.debug.warn("llvm-tblgen crashed\n", .{}); + std.process.exit(1); + }, + }; + + var parser = json.Parser.init(allocator, false); + const tree = try parser.parse(json_text); + const root_map = &tree.root.Object; + + var all_names = std.ArrayList([]const u8).init(allocator); + { + var it = root_map.iterator(); + it_map: while (it.next()) |kv| { + if (kv.key.len == 0) continue; + if (kv.key[0] == '!') continue; + if (kv.value != .Object) continue; + if (!kv.value.Object.contains("NumArgs")) continue; + if (!kv.value.Object.contains("Name")) continue; + for (blacklisted_options) |blacklisted_key| { + if (std.mem.eql(u8, blacklisted_key, kv.key)) continue :it_map; + } + if (kv.value.Object.get("Name").?.value.String.len == 0) continue; + try all_names.append(kv.key); + } + } + std.sort.sort([]const u8, all_names.span(), nameLessThan); + + var stdout_bos = std.io.bufferedOutStream(std.io.getStdOut().outStream()); + const stdout = stdout_bos.outStream(); + try stdout.writeAll( + \\// This file is generated by tools/update_clang_options.zig. + \\// zig fmt: off + \\usingnamespace @import("clang_options.zig"); + \\pub const data = blk: { @setEvalBranchQuota(6000); break :blk &[_]CliArg{ + \\ + ); + + for (all_names.span()) |key| { + const obj = &root_map.get(key).?.value.Object; + const name = obj.get("Name").?.value.String; + var pd1 = false; + var pd2 = false; + var pslash = false; + for (obj.get("Prefixes").?.value.Array.span()) |prefix_json| { + const prefix = prefix_json.String; + if (std.mem.eql(u8, prefix, "-")) { + pd1 = true; + } else if (std.mem.eql(u8, prefix, "--")) { + pd2 = true; + } else if (std.mem.eql(u8, prefix, "/")) { + pslash = true; + } else { + std.debug.warn("{} (key {}) has unrecognized prefix '{}'\n", .{ name, key, prefix }); + std.process.exit(1); + } + } + const num_args = @intCast(u8, obj.get("NumArgs").?.value.Integer); + const syntax_str: []const u8 = blk: { + for (obj.get("!superclasses").?.value.Array.span()) |superclass_json| { + const superclass = superclass_json.String; + if (std.mem.eql(u8, superclass, "Joined")) { + break :blk ".joined"; + } else if (std.mem.eql(u8, superclass, "CLJoined")) { + break :blk ".joined"; + } else if (std.mem.eql(u8, superclass, "CLIgnoredJoined")) { + break :blk ".joined"; + } else if (std.mem.eql(u8, superclass, "CLCompileJoined")) { + break :blk ".joined"; + } else if (std.mem.eql(u8, superclass, "JoinedOrSeparate")) { + break :blk ".joined_or_separate"; + } else if (std.mem.eql(u8, superclass, "CLJoinedOrSeparate")) { + break :blk ".joined_or_separate"; + } else if (std.mem.eql(u8, superclass, "CLCompileJoinedOrSeparate")) { + break :blk ".joined_or_separate"; + } else if (std.mem.eql(u8, superclass, "Flag")) { + break :blk ".flag"; + } else if (std.mem.eql(u8, superclass, "CLFlag")) { + break :blk ".flag"; + } else if (std.mem.eql(u8, superclass, "CLIgnoredFlag")) { + break :blk ".flag"; + } else if (std.mem.eql(u8, superclass, "Separate")) { + break :blk ".separate"; + } else if (std.mem.eql(u8, superclass, "JoinedAndSeparate")) { + break :blk ".joined_and_separate"; + } else if (std.mem.eql(u8, superclass, "CommaJoined")) { + break :blk ".comma_joined"; + } else if (std.mem.eql(u8, superclass, "CLRemainingArgsJoined")) { + break :blk ".remaining_args_joined"; + } else if (std.mem.eql(u8, superclass, "MultiArg")) { + break :blk try std.fmt.allocPrint(allocator, ".{{ .multi_arg = {} }}", .{num_args}); + } + } + if (std.mem.eql(u8, name, "")) { + break :blk ".flag"; + } else if (std.mem.eql(u8, name, "")) { + break :blk ".flag"; + } + const kind_def = obj.get("Kind").?.value.Object.get("def").?.value.String; + if (std.mem.eql(u8, kind_def, "KIND_FLAG")) { + break :blk ".flag"; + } + std.debug.warn("{} (key {}) has unrecognized superclasses:\n", .{ name, key }); + for (obj.get("!superclasses").?.value.Array.span()) |superclass_json| { + std.debug.warn(" {}\n", .{superclass_json.String}); + } + std.process.exit(1); + }; + if (knownOption(name)) |ident| { + try stdout.print( + \\.{{ + \\ .name = "{}", + \\ .syntax = {}, + \\ .zig_equivalent = .{}, + \\ .pd1 = {}, + \\ .pd2 = {}, + \\ .psl = {}, + \\}}, + \\ + , .{ name, syntax_str, ident, pd1, pd2, pslash }); + } else if (pd1 and !pd2 and !pslash and + std.mem.eql(u8, syntax_str, ".flag")) + { + try stdout.print("flagpd1(\"{}\"),\n", .{name}); + } else if (pd1 and !pd2 and !pslash and + std.mem.eql(u8, syntax_str, ".joined")) + { + try stdout.print("joinpd1(\"{}\"),\n", .{name}); + } else if (pd1 and !pd2 and !pslash and + std.mem.eql(u8, syntax_str, ".joined_or_separate")) + { + try stdout.print("jspd1(\"{}\"),\n", .{name}); + } else if (pd1 and !pd2 and !pslash and + std.mem.eql(u8, syntax_str, ".separate")) + { + try stdout.print("sepd1(\"{}\"),\n", .{name}); + } else { + try stdout.print( + \\.{{ + \\ .name = "{}", + \\ .syntax = {}, + \\ .zig_equivalent = .other, + \\ .pd1 = {}, + \\ .pd2 = {}, + \\ .psl = {}, + \\}}, + \\ + , .{ name, syntax_str, pd1, pd2, pslash }); + } + } + + try stdout.writeAll( + \\};}; + \\ + ); + + try stdout_bos.flush(); +} + +fn nameLessThan(a: []const u8, b: []const u8) bool { + return std.mem.lessThan(u8, a, b); +} + +fn usageAndExit(file: fs.File, arg0: []const u8, code: u8) noreturn { + file.outStream().print( + \\Usage: {} /path/to/llvm-tblgen /path/to/git/llvm/llvm-project + \\ + \\Prints to stdout Zig code which you can use to replace the file src-self-hosted/clang_options_data.zig. + \\ + , .{arg0}) catch std.process.exit(1); + std.process.exit(code); +}