authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-08-02 19:43:38-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-08-02 19:43:38-07:00
logd631bfe0601bbe3b9bfd1ce2c2d0cad90997221f
treead0401bac06da868df738f6e4e503fe74b89c5d6
parentc75226d03356f33df698d5e5a74173476bd47240

update clang CLI options to LLVM 15


2 files changed, 292 insertions(+), 33 deletions(-)

src/clang_options_data.zig+274-21
......@@ -137,7 +137,9 @@ flagpd1("Wframe-larger-than"),
137137flagpd1("Wlarge-by-value-copy"),
138138flagpd1("Wno-deprecated"),
139139flagpd1("Wno-rewrite-macros"),
140flagpd1("Wno-system-headers"),
140141flagpd1("Wno-write-strings"),
142flagpd1("Wsystem-headers"),
141143flagpd1("Wwrite-strings"),
142144flagpd1("X"),
143145sepd1("Xanalyzer"),
......@@ -235,14 +237,6 @@ sepd1("Zlinker-input"),
235237 .pd2 = false,
236238 .psl = true,
237239},
238.{
239 .name = "FA",
240 .syntax = .flag,
241 .zig_equivalent = .other,
242 .pd1 = true,
243 .pd2 = false,
244 .psl = true,
245},
246240.{
247241 .name = "FC",
248242 .syntax = .flag,
......@@ -531,6 +525,14 @@ sepd1("Zlinker-input"),
531525 .pd2 = false,
532526 .psl = true,
533527},
528.{
529 .name = "JMC-",
530 .syntax = .flag,
531 .zig_equivalent = .other,
532 .pd1 = true,
533 .pd2 = false,
534 .psl = true,
535},
534536.{
535537 .name = "LD",
536538 .syntax = .flag,
......@@ -1036,6 +1038,14 @@ flagpsl("MT"),
10361038 .pd2 = false,
10371039 .psl = true,
10381040},
1041.{
1042 .name = "Zc:wchar_t-",
1043 .syntax = .flag,
1044 .zig_equivalent = .other,
1045 .pd1 = true,
1046 .pd2 = false,
1047 .psl = true,
1048},
10391049.{
10401050 .name = "Ze",
10411051 .syntax = .flag,
......@@ -1196,6 +1206,46 @@ flagpsl("MT"),
11961206 .pd2 = false,
11971207 .psl = true,
11981208},
1209.{
1210 .name = "external:W0",
1211 .syntax = .flag,
1212 .zig_equivalent = .other,
1213 .pd1 = true,
1214 .pd2 = false,
1215 .psl = true,
1216},
1217.{
1218 .name = "external:W1",
1219 .syntax = .flag,
1220 .zig_equivalent = .other,
1221 .pd1 = true,
1222 .pd2 = false,
1223 .psl = true,
1224},
1225.{
1226 .name = "external:W2",
1227 .syntax = .flag,
1228 .zig_equivalent = .other,
1229 .pd1 = true,
1230 .pd2 = false,
1231 .psl = true,
1232},
1233.{
1234 .name = "external:W3",
1235 .syntax = .flag,
1236 .zig_equivalent = .other,
1237 .pd1 = true,
1238 .pd2 = false,
1239 .psl = true,
1240},
1241.{
1242 .name = "external:W4",
1243 .syntax = .flag,
1244 .zig_equivalent = .other,
1245 .pd1 = true,
1246 .pd2 = false,
1247 .psl = true,
1248},
11991249.{
12001250 .name = "fp:except",
12011251 .syntax = .flag,
......@@ -2206,6 +2256,8 @@ flagpd1("shared-libasan"),
22062256 .pd2 = false,
22072257 .psl = true,
22082258},
2259flagpd1("fdiagnostics-color"),
2260flagpd1("fno-diagnostics-color"),
22092261flagpd1("frecord-gcc-switches"),
22102262flagpd1("fno-record-gcc-switches"),
22112263flagpd1("fident"),
......@@ -2378,6 +2430,8 @@ flagpd1("dD"),
23782430flagpd1("dI"),
23792431flagpd1("dM"),
23802432flagpd1("d"),
2433sepd1("darwin-target-variant"),
2434sepd1("darwin-target-variant-triple"),
23812435flagpd1("dead_strip"),
23822436flagpd1("debug-forward-template-params"),
23832437flagpd1("debug-info-macro"),
......@@ -2394,7 +2448,6 @@ flagpd1("disable-lifetime-markers"),
23942448flagpd1("disable-llvm-optzns"),
23952449flagpd1("disable-llvm-passes"),
23962450flagpd1("disable-llvm-verifier"),
2397flagpd1("disable-noundef-analysis"),
23982451flagpd1("disable-objc-default-synthesize-properties"),
23992452flagpd1("disable-pragma-debug-crash"),
24002453flagpd1("disable-red-zone"),
......@@ -2410,6 +2463,14 @@ sepd1("dwarf-debug-flags"),
24102463sepd1("dwarf-debug-producer"),
24112464flagpd1("dwarf-explicit-import"),
24122465flagpd1("dwarf-ext-refs"),
2466.{
2467 .name = "hlsl-no-stdinc",
2468 .syntax = .flag,
2469 .zig_equivalent = .other,
2470 .pd1 = true,
2471 .pd2 = false,
2472 .psl = true,
2473},
24132474sepd1("dylib_file"),
24142475flagpd1("dylinker"),
24152476flagpd1("dynamic"),
......@@ -2424,7 +2485,9 @@ flagpd1("dynamic"),
24242485flagpd1("ehcontguard"),
24252486flagpd1("emit-ast"),
24262487flagpd1("emit-codegen-only"),
2488flagpd1("emit-fir"),
24272489flagpd1("emit-header-module"),
2490flagpd1("emit-header-unit"),
24282491flagpd1("emit-html"),
24292492flagpd1("emit-interface-stubs"),
24302493.{
......@@ -2439,10 +2502,19 @@ flagpd1("emit-llvm-bc"),
24392502flagpd1("emit-llvm-only"),
24402503flagpd1("emit-llvm-uselists"),
24412504flagpd1("emit-merged-ifs"),
2505flagpd1("emit-mlir"),
24422506flagpd1("emit-module"),
24432507flagpd1("emit-module-interface"),
24442508flagpd1("emit-obj"),
24452509flagpd1("emit-pch"),
2510.{
2511 .name = "emit-pristine-llvm",
2512 .syntax = .flag,
2513 .zig_equivalent = .other,
2514 .pd1 = true,
2515 .pd2 = false,
2516 .psl = true,
2517},
24462518.{
24472519 .name = "emit-static-lib",
24482520 .syntax = .flag,
......@@ -2451,6 +2523,15 @@ flagpd1("emit-pch"),
24512523 .pd2 = true,
24522524 .psl = false,
24532525},
2526.{
2527 .name = "enable-16bit-types",
2528 .syntax = .flag,
2529 .zig_equivalent = .other,
2530 .pd1 = true,
2531 .pd2 = false,
2532 .psl = true,
2533},
2534flagpd1("enable-noundef-analysis"),
24542535flagpd1("enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang"),
24552536.{
24562537 .name = "end-no-unused-arguments",
......@@ -2501,6 +2582,7 @@ flagpd1("falternative-parameter-statement"),
25012582flagpd1("faltivec"),
25022583flagpd1("fanalyzed-objects-for-unparse"),
25032584flagpd1("fkeep-inline-functions"),
2585flagpd1("funit-at-a-time"),
25042586flagpd1("fansi-escape-codes"),
25052587flagpd1("fapple-kext"),
25062588flagpd1("fapple-link-rtlib"),
......@@ -2558,6 +2640,14 @@ flagpd1("fcaller-saves"),
25582640},
25592641sepd1("fcaret-diagnostics-max-lines"),
25602642flagpd1("fcf-protection"),
2643.{
2644 .name = "fcgl",
2645 .syntax = .flag,
2646 .zig_equivalent = .other,
2647 .pd1 = true,
2648 .pd2 = false,
2649 .psl = true,
2650},
25612651flagpd1("fchar8_t"),
25622652flagpd1("fcheck-array-temporaries"),
25632653.{
......@@ -2601,6 +2691,7 @@ flagpd1("fdebug-dump-all"),
26012691flagpd1("fdebug-dump-parse-tree"),
26022692flagpd1("fdebug-dump-parse-tree-no-sema"),
26032693flagpd1("fdebug-dump-parsing-log"),
2694flagpd1("fdebug-dump-pft"),
26042695flagpd1("fdebug-dump-provenance"),
26052696flagpd1("fdebug-dump-symbols"),
26062697flagpd1("fdebug-info-for-profiling"),
......@@ -2631,7 +2722,6 @@ flagpd1("fdeprecated-macro"),
26312722flagpd1("fdevirtualize"),
26322723flagpd1("fdevirtualize-speculatively"),
26332724flagpd1("fdiagnostics-absolute-paths"),
2634flagpd1("fdiagnostics-color"),
26352725flagpd1("fdiagnostics-fixit-info"),
26362726sepd1("fdiagnostics-format"),
26372727flagpd1("fdiagnostics-parseable-fixits"),
......@@ -2643,11 +2733,13 @@ flagpd1("fdiagnostics-show-option"),
26432733flagpd1("fdiagnostics-show-template-tree"),
26442734flagpd1("fdigraphs"),
26452735flagpd1("fdirect-access-external-data"),
2736flagpd1("fdirectives-only"),
26462737flagpd1("fdisable-module-hash"),
26472738flagpd1("fdiscard-value-names"),
26482739flagpd1("fdollar-ok"),
26492740flagpd1("fdollars-in-identifiers"),
26502741flagpd1("fdouble-square-bracket-attributes"),
2742flagpd1("fdriver-only"),
26512743flagpd1("fdump-fortran-optimized"),
26522744flagpd1("fdump-fortran-original"),
26532745flagpd1("fdump-parse-tree"),
......@@ -2672,6 +2764,7 @@ sepd1("ferror-limit"),
26722764flagpd1("fescaping-block-tail-calls"),
26732765flagpd1("fexceptions"),
26742766flagpd1("fexperimental-isel"),
2767flagpd1("fexperimental-library"),
26752768flagpd1("fexperimental-new-constant-interpreter"),
26762769flagpd1("fexperimental-new-pass-manager"),
26772770flagpd1("fexperimental-relative-c++-abi-vtables"),
......@@ -2683,6 +2776,7 @@ flagpd1("ffake-address-space-map"),
26832776flagpd1("ffast-math"),
26842777flagpd1("ffat-lto-objects"),
26852778flagpd1("fcheck-new"),
2779flagpd1("ffile-reproducible"),
26862780flagpd1("fimplicit-modules-use-lock"),
26872781flagpd1("ffine-grained-bitfield-accesses"),
26882782flagpd1("ffinite-loops"),
......@@ -2786,6 +2880,7 @@ flagpd1("fhalf-no-semantic-interposition"),
27862880flagpd1("fheinous-gnu-extensions"),
27872881flagpd1("fhip-dump-offload-linker-script"),
27882882flagpd1("fhip-fp32-correctly-rounded-divide-sqrt"),
2883flagpd1("fhip-kernel-arg-name"),
27892884flagpd1("fhip-new-launch-api"),
27902885flagpd1("fhonor-infinities"),
27912886flagpd1("fhonor-nans"),
......@@ -2811,6 +2906,7 @@ flagpd1("finstrument-functions-after-inlining"),
28112906flagpd1("finteger-4-integer-8"),
28122907flagpd1("fintegrated-as"),
28132908flagpd1("fintegrated-cc1"),
2909flagpd1("fintegrated-objemitter"),
28142910sepd1("fintrinsic-modules-path"),
28152911flagpd1("fipa-cp"),
28162912flagpd1("fivopts"),
......@@ -2819,12 +2915,13 @@ flagpd1("fix-what-you-can"),
28192915flagpd1("fixit"),
28202916flagpd1("fixit-recompile"),
28212917flagpd1("fixit-to-temporary"),
2918flagpd1("fjmc"),
28222919flagpd1("fjump-tables"),
28232920flagpd1("fkeep-static-consts"),
2921flagpd1("flang-experimental-exec"),
28242922flagpd1("flarge-sizes"),
28252923flagpd1("flat_namespace"),
28262924flagpd1("flax-vector-conversions"),
2827flagpd1("flegacy-pass-manager"),
28282925flagpd1("flimit-debug-info"),
28292926flagpd1("flogical-abbreviations"),
28302927.{
......@@ -2849,6 +2946,8 @@ flagpd1("fmerge-functions"),
28492946flagpd1("fminimize-whitespace"),
28502947sepd1("fmodule-feature"),
28512948flagpd1("fmodule-file-deps"),
2949flagpd1("fmodule-file-home-is-cwd"),
2950flagpd1("fmodule-header"),
28522951sepd1("fmodule-implementation-of"),
28532952flagpd1("fmodule-map-file-home-is-cwd"),
28542953flagpd1("fmodule-maps"),
......@@ -2873,6 +2972,7 @@ flagpd1("fmodulo-sched-allow-regmoves"),
28732972flagpd1("fms-compatibility"),
28742973flagpd1("fms-extensions"),
28752974flagpd1("fms-hotpatch"),
2975flagpd1("fms-kernel"),
28762976flagpd1("fms-volatile"),
28772977flagpd1("fmudflap"),
28782978flagpd1("fmudflapth"),
......@@ -2912,6 +3012,7 @@ flagpd1("fno-allow-editor-placeholders"),
29123012flagpd1("fno-altivec"),
29133013flagpd1("fno-analyzed-objects-for-unparse"),
29143014flagpd1("fno-keep-inline-functions"),
3015flagpd1("fno-unit-at-a-time"),
29153016flagpd1("fno-apple-pragma-pack"),
29163017flagpd1("fno-application-extension"),
29173018flagpd1("fno-approx-func"),
......@@ -2961,7 +3062,6 @@ flagpd1("fno-check-array-temporaries"),
29613062},
29623063flagpd1("fno-common"),
29633064flagpd1("fno-complete-member-pointers"),
2964flagpd1("fno-concept-satisfaction-caching"),
29653065flagpd1("fno-const-strings"),
29663066flagpd1("fno-constant-cfstrings"),
29673067flagpd1("fno-coroutines-ts"),
......@@ -2990,7 +3090,6 @@ flagpd1("fno-delete-null-pointer-checks"),
29903090flagpd1("fno-deprecated-macro"),
29913091flagpd1("fno-devirtualize"),
29923092flagpd1("fno-devirtualize-speculatively"),
2993flagpd1("fno-diagnostics-color"),
29943093flagpd1("fno-diagnostics-fixit-info"),
29953094flagpd1("fno-diagnostics-show-hotness"),
29963095flagpd1("fno-diagnostics-show-note-include-stack"),
......@@ -2998,6 +3097,7 @@ flagpd1("fno-diagnostics-show-option"),
29983097flagpd1("fno-diagnostics-use-presumed-location"),
29993098flagpd1("fno-digraphs"),
30003099flagpd1("fno-direct-access-external-data"),
3100flagpd1("fno-directives-only"),
30013101flagpd1("fno-discard-value-names"),
30023102flagpd1("fno-dllexport-inlines"),
30033103flagpd1("fno-dollar-ok"),
......@@ -3016,13 +3116,14 @@ flagpd1("fno-emulated-tls"),
30163116flagpd1("fno-escaping-block-tail-calls"),
30173117flagpd1("fno-exceptions"),
30183118flagpd1("fno-experimental-isel"),
3019flagpd1("fno-experimental-new-pass-manager"),
3119flagpd1("fno-experimental-library"),
30203120flagpd1("fno-experimental-relative-c++-abi-vtables"),
30213121flagpd1("fno-external-blas"),
30223122flagpd1("fno-f2c"),
30233123flagpd1("fno-fast-math"),
30243124flagpd1("fno-fat-lto-objects"),
30253125flagpd1("fno-check-new"),
3126flagpd1("fno-file-reproducible"),
30263127flagpd1("fno-implicit-modules-use-lock"),
30273128flagpd1("fno-fine-grained-bitfield-accesses"),
30283129flagpd1("fno-finite-loops"),
......@@ -3061,6 +3162,7 @@ flagpd1("fno-gpu-flush-denormals-to-zero"),
30613162flagpd1("fno-gpu-rdc"),
30623163flagpd1("fno-gpu-sanitize"),
30633164flagpd1("fno-hip-fp32-correctly-rounded-divide-sqrt"),
3165flagpd1("fno-hip-kernel-arg-name"),
30643166flagpd1("fno-hip-new-launch-api"),
30653167flagpd1("fno-honor-infinities"),
30663168flagpd1("fno-honor-nans"),
......@@ -3077,10 +3179,13 @@ flagpd1("fno-inline-small-functions"),
30773179flagpd1("fno-integer-4-integer-8"),
30783180flagpd1("fno-integrated-as"),
30793181flagpd1("fno-integrated-cc1"),
3182flagpd1("fno-integrated-objemitter"),
30803183flagpd1("fno-ipa-cp"),
30813184flagpd1("fno-ivopts"),
3185flagpd1("fno-jmc"),
30823186flagpd1("fno-jump-tables"),
30833187flagpd1("fno-keep-static-consts"),
3188flagpd1("fno-knr-functions"),
30843189flagpd1("fno-lax-vector-conversions"),
30853190flagpd1("fno-legacy-pass-manager"),
30863191flagpd1("fno-limit-debug-info"),
......@@ -3145,6 +3250,7 @@ flagpd1("fno-openmp-cuda-force-full-runtime"),
31453250flagpd1("fno-openmp-cuda-mode"),
31463251flagpd1("fno-openmp-extensions"),
31473252flagpd1("fno-openmp-implicit-rpath"),
3253flagpd1("fno-openmp-new-driver"),
31483254flagpd1("fno-openmp-optimistic-collapse"),
31493255flagpd1("fno-openmp-simd"),
31503256flagpd1("fno-openmp-target-debug"),
......@@ -3227,6 +3333,7 @@ flagpd1("fno-rtlib-add-rpath"),
32273333flagpd1("fno-rtti"),
32283334flagpd1("fno-rtti-data"),
32293335flagpd1("fno-rwpi"),
3336flagpd1("fno-sanitize-address-globals-dead-stripping"),
32303337flagpd1("fno-sanitize-address-outline-instrumentation"),
32313338flagpd1("fno-sanitize-address-poison-custom-array-cookie"),
32323339flagpd1("fno-sanitize-address-use-after-scope"),
......@@ -3311,7 +3418,6 @@ flagpd1("fno-underscoring"),
33113418flagpd1("fno-unique-basic-block-section-names"),
33123419flagpd1("fno-unique-internal-linkage-names"),
33133420flagpd1("fno-unique-section-names"),
3314flagpd1("fno-unit-at-a-time"),
33153421flagpd1("fno-unroll-all-loops"),
33163422flagpd1("fno-unroll-loops"),
33173423flagpd1("fno-unsafe-loop-optimizations"),
......@@ -3392,6 +3498,7 @@ flagpd1("foffload-lto"),
33923498},
33933499flagpd1("fopenacc"),
33943500flagpd1("fopenmp"),
3501flagpd1("fopenmp-assume-no-thread-state"),
33953502flagpd1("fopenmp-assume-teams-oversubscription"),
33963503flagpd1("fopenmp-assume-threads-oversubscription"),
33973504flagpd1("fopenmp-cuda-force-full-runtime"),
......@@ -3402,6 +3509,7 @@ sepd1("fopenmp-host-ir-file-path"),
34023509flagpd1("fopenmp-implicit-rpath"),
34033510flagpd1("fopenmp-is-device"),
34043511flagpd1("fopenmp-new-driver"),
3512flagpd1("fopenmp-offload-mandatory"),
34053513flagpd1("fopenmp-optimistic-collapse"),
34063514flagpd1("fopenmp-relocatable-target"),
34073515flagpd1("fopenmp-simd"),
......@@ -3624,7 +3732,6 @@ flagpd1("funderscoring"),
36243732flagpd1("funique-basic-block-section-names"),
36253733flagpd1("funique-internal-linkage-names"),
36263734flagpd1("funique-section-names"),
3627flagpd1("funit-at-a-time"),
36283735flagpd1("funknown-anytype"),
36293736flagpd1("funroll-all-loops"),
36303737flagpd1("funroll-loops"),
......@@ -3809,6 +3916,7 @@ flagpd1("m68060"),
38093916flagpd1("m80387"),
38103917m("mseses"),
38113918flagpd1("mabi=ieeelongdouble"),
3919flagpd1("mabi=quadword-atomics"),
38123920flagpd1("mabi=vec-default"),
38133921flagpd1("mabi=vec-extabi"),
38143922flagpd1("mabicalls"),
......@@ -3872,7 +3980,6 @@ m("mcumode"),
38723980m("mcx16"),
38733981sepd1("mdebug-pass"),
38743982m("mdirect-move"),
3875flagpd1("mdisable-tail-calls"),
38763983flagpd1("mdouble-float"),
38773984m("mdsp"),
38783985m("mdspr2"),
......@@ -3886,6 +3993,7 @@ flagpd1("menable-unsafe-fp-math"),
38863993m("menqcmd"),
38873994m("mexception-handling"),
38883995m("mexecute-only"),
3996flagpd1("mextended-const"),
38893997flagpd1("mextern-sdata"),
38903998m("mf16c"),
38913999flagpd1("mfancy-math-387"),
......@@ -3894,6 +4002,8 @@ flagpd1("mfix4300"),
38944002flagpd1("mfix-and-continue"),
38954003m("mfix-cmse-cve-2021-35465"),
38964004m("mfix-cortex-a53-835769"),
4005flagpd1("mfix-cortex-a57-aes-1742098"),
4006flagpd1("mfix-cortex-a72-aes-1655431"),
38974007m("mfloat128"),
38984008sepd1("mfloat-abi"),
38994009m("mfma"),
......@@ -3972,6 +4082,7 @@ m("mmemops"),
39724082flagpd1("mmfcrf"),
39734083m("mmfocrf"),
39744084m("mmicromips"),
4085sepd1("mmlir"),
39754086m("mmma"),
39764087m("mmmx"),
39774088m("mmovbe"),
......@@ -4042,10 +4153,13 @@ m("mno-enqcmd"),
40424153m("mno-exception-handling"),
40434154flagpd1("mnoexecstack"),
40444155m("mno-execute-only"),
4156flagpd1("mno-extended-const"),
40454157flagpd1("mno-extern-sdata"),
40464158m("mno-f16c"),
40474159m("mno-fix-cmse-cve-2021-35465"),
40484160m("mno-fix-cortex-a53-835769"),
4161flagpd1("mno-fix-cortex-a57-aes-1742098"),
4162flagpd1("mno-fix-cortex-a72-aes-1655431"),
40494163m("mno-float128"),
40504164m("mno-fma"),
40514165m("mno-fma4"),
......@@ -4123,6 +4237,7 @@ m("mno-prfchw"),
41234237m("mno-ptwrite"),
41244238flagpd1("mno-pure-code"),
41254239m("mno-rdpid"),
4240flagpd1("mno-rdpru"),
41264241m("mno-rdrnd"),
41274242m("mno-rdseed"),
41284243.{
......@@ -4204,7 +4319,6 @@ m("mnvj"),
42044319m("mnvs"),
42054320flagpd1("modd-spreg"),
42064321sepd1("module-dependency-dir"),
4207sepd1("module-dir"),
42084322flagpd1("module-file-deps"),
42094323flagpd1("module-file-info"),
42104324sepd1("module-suffix"),
......@@ -4233,6 +4347,7 @@ m("mptwrite"),
42334347flagpd1("mpure-code"),
42344348flagpd1("mqdsp6-compat"),
42354349m("mrdpid"),
4350flagpd1("mrdpru"),
42364351m("mrdrnd"),
42374352m("mrdseed"),
42384353flagpd1("mreassociate"),
......@@ -4369,6 +4484,7 @@ flagpd1("no-cpp-precomp"),
43694484 .psl = false,
43704485},
43714486flagpd1("no-emit-llvm-uselists"),
4487flagpd1("no-enable-noundef-analysis"),
43724488.{
43734489 .name = "no-gpu-bundle-output",
43744490 .syntax = .flag,
......@@ -4377,6 +4493,7 @@ flagpd1("no-emit-llvm-uselists"),
43774493 .pd2 = true,
43784494 .psl = false,
43794495},
4496flagpd1("no-hip-rt"),
43804497flagpd1("no-implicit-float"),
43814498.{
43824499 .name = "no-integrated-cpp",
......@@ -4386,6 +4503,15 @@ flagpd1("no-implicit-float"),
43864503 .pd2 = true,
43874504 .psl = false,
43884505},
4506.{
4507 .name = "no-offload-new-driver",
4508 .syntax = .flag,
4509 .zig_equivalent = .other,
4510 .pd1 = false,
4511 .pd2 = true,
4512 .psl = false,
4513},
4514flagpd1("no-opaque-pointers"),
43894515.{
43904516 .name = "no-pedantic",
43914517 .syntax = .flag,
......@@ -4408,6 +4534,7 @@ flagpd1("no-struct-path-tbaa"),
44084534flagpd1("nobuiltininc"),
44094535flagpd1("nocpp"),
44104536flagpd1("nodefaultlibs"),
4537flagpd1("nodriverkitlib"),
44114538flagpd1("nofixprebinding"),
44124539flagpd1("nogpuinc"),
44134540flagpd1("nogpulib"),
......@@ -4491,6 +4618,47 @@ flagpd1("objcmt-ns-nonatomic-iosonly"),
44914618flagpd1("objcmt-returns-innerpointer-property"),
44924619flagpd1("object"),
44934620sepd1("object-file-name"),
4621.{
4622 .name = "offload-device-only",
4623 .syntax = .flag,
4624 .zig_equivalent = .other,
4625 .pd1 = false,
4626 .pd2 = true,
4627 .psl = false,
4628},
4629.{
4630 .name = "offload-host-device",
4631 .syntax = .flag,
4632 .zig_equivalent = .other,
4633 .pd1 = false,
4634 .pd2 = true,
4635 .psl = false,
4636},
4637.{
4638 .name = "offload-host-only",
4639 .syntax = .flag,
4640 .zig_equivalent = .other,
4641 .pd1 = false,
4642 .pd2 = true,
4643 .psl = false,
4644},
4645.{
4646 .name = "offload-link",
4647 .syntax = .flag,
4648 .zig_equivalent = .other,
4649 .pd1 = false,
4650 .pd2 = true,
4651 .psl = false,
4652},
4653.{
4654 .name = "offload-new-driver",
4655 .syntax = .flag,
4656 .zig_equivalent = .other,
4657 .pd1 = false,
4658 .pd2 = true,
4659 .psl = false,
4660},
4661flagpd1("opaque-pointers"),
44944662sepd1("opt-record-file"),
44954663sepd1("opt-record-format"),
44964664sepd1("opt-record-passes"),
......@@ -4546,6 +4714,14 @@ flagpd1("prebind"),
45464714flagpd1("prebind_all_twolevel_modules"),
45474715flagpd1("preload"),
45484716flagpd1("print-dependency-directives-minimized-source"),
4717.{
4718 .name = "print-diagnostic-options",
4719 .syntax = .flag,
4720 .zig_equivalent = .other,
4721 .pd1 = true,
4722 .pd2 = true,
4723 .psl = false,
4724},
45494725.{
45504726 .name = "print-effective-triple",
45514727 .syntax = .flag,
......@@ -4940,6 +5116,7 @@ joinpd1("fsanitize-undefined-strip-path-components="),
49405116joinpd1("fopenmp-cuda-teams-reduction-recs-num="),
49415117joinpd1("fvisibility-externs-nodllstorageclass="),
49425118joinpd1("analyzer-config-compatibility-mode="),
5119joinpd1("mdefault-visibility-export-mapping="),
49435120joinpd1("fsanitize-address-use-after-return="),
49445121.{
49455122 .name = "fsanitize-address-use-after-return",
......@@ -4949,9 +5126,12 @@ joinpd1("fsanitize-address-use-after-return="),
49495126 .pd2 = false,
49505127 .psl = true,
49515128},
5129joinpd1("darwin-target-variant-sdk-version="),
49525130joinpd1("ftrivial-auto-var-init-stop-after="),
49535131joinpd1("fverify-debuginfo-preserve-export="),
5132joinpd1("fdiagnostics-misexpect-tolerance="),
49545133joinpd1("fpatchable-function-entry-offset="),
5134joinpd1("fprofile-selected-function-group="),
49555135joinpd1("analyzer-inline-max-stack-depth="),
49565136joinpd1("fsanitize-address-field-padding="),
49575137.{
......@@ -4963,6 +5143,7 @@ joinpd1("fsanitize-address-field-padding="),
49635143 .psl = true,
49645144},
49655145joinpd1("fdiagnostics-hotness-threshold="),
5146joinpd1("fexperimental-max-bitint-width="),
49665147joinpd1("fsanitize-memory-track-origins="),
49675148joinpd1("mwatchos-simulator-version-min="),
49685149joinpd1("fsanitize-coverage-ignorelist="),
......@@ -4971,6 +5152,7 @@ joinpd1("fvisibility-nodllstorageclass="),
49715152joinpd1("fxray-selected-function-group="),
49725153joinpd1("mappletvsimulator-version-min="),
49735154joinpd1("mstack-protector-guard-offset="),
5155joinpd1("mstack-protector-guard-symbol="),
49745156.{
49755157 .name = "sourceDependencies:directives",
49765158 .syntax = .joined_or_separate,
......@@ -4979,16 +5161,17 @@ joinpd1("mstack-protector-guard-offset="),
49795161 .pd2 = false,
49805162 .psl = true,
49815163},
5164joinpd1("miphonesimulator-version-min="),
49825165joinpd1("fsanitize-coverage-whitelist="),
49835166joinpd1("fsanitize-coverage-blacklist="),
49845167joinpd1("fobjc-nonfragile-abi-version="),
49855168joinpd1("fprofile-instrument-use-path="),
49865169joinpd1("fsanitize-coverage-allowlist="),
49875170jspd1("fxray-instrumentation-bundle="),
4988joinpd1("miphonesimulator-version-min="),
49895171joinpd1("fsanitize-address-destructor="),
49905172joinpd1("faddress-space-map-mangling="),
49915173joinpd1("foptimization-record-passes="),
5174joinpd1("frandomize-layout-seed-file="),
49925175joinpd1("fsanitize-system-ignorelist="),
49935176joinpd1("ftest-module-file-extension="),
49945177jspd1("fxray-instruction-threshold="),
......@@ -5000,6 +5183,14 @@ jspd1("fxray-instruction-threshold="),
50005183 .pd2 = true,
50015184 .psl = false,
50025185},
5186.{
5187 .name = "libomptarget-amdgpu-bc-path=",
5188 .syntax = .joined,
5189 .zig_equivalent = .other,
5190 .pd1 = false,
5191 .pd2 = true,
5192 .psl = false,
5193},
50035194joinpd1("mno-default-build-attributes"),
50045195joinpd1("mtvos-simulator-version-min="),
50055196joinpd1("mwatchsimulator-version-min="),
......@@ -5065,6 +5256,7 @@ joinpd1("objcmt-allowlist-dir-path="),
50655256joinpd1("Wno-nonportable-cfstrings"),
50665257joinpd1("analyzer-disable-checker="),
50675258joinpd1("fbuild-session-timestamp="),
5259joinpd1("fprofile-function-groups="),
50685260joinpd1("fprofile-instrument-path="),
50695261joinpd1("mdefault-build-attributes"),
50705262joinpd1("msign-return-address-key="),
......@@ -5136,6 +5328,7 @@ joinpd1("ffp-exception-behavior="),
51365328joinpd1("fmacro-backtrace-limit="),
51375329joinpd1("fmax-array-constructor="),
51385330joinpd1("fprofile-exclude-files="),
5331joinpd1("frandomize-layout-seed="),
51395332joinpd1("ftrivial-auto-var-init="),
51405333jspd1("fxray-never-instrument="),
51415334joinpd1("gsimple-template-names="),
......@@ -5144,6 +5337,7 @@ joinpd1("malign-branch-boundary="),
51445337joinpd1("mappletvos-version-min="),
51455338joinpd1("mstack-protector-guard="),
51465339joinpd1("Wnonportable-cfstrings"),
5340joinpd1("miphoneos-version-min="),
51475341joinpd1("fbasic-block-sections="),
51485342joinpd1("fdefault-calling-conv="),
51495343joinpd1("fdenormal-fp-math-f32="),
......@@ -5164,10 +5358,10 @@ joinpd1("fobjc-dispatch-method="),
51645358joinpd1("foperator-arrow-depth="),
51655359joinpd1("fprebuilt-module-path="),
51665360joinpd1("fprofile-filter-files="),
5361joinpd1("fsanitize-memtag-mode="),
51675362joinpd1("fspell-checking-limit="),
51685363joinpd1("fvisibility-dllexport="),
51695364joinpd1("fxray-function-groups="),
5170joinpd1("miphoneos-version-min="),
51715365joinpd1("msmall-data-threshold="),
51725366joinpd1("Wlarge-by-value-copy="),
51735367joinpd1("analyzer-constraints="),
......@@ -5187,6 +5381,7 @@ joinpd1("fmodules-prune-after="),
51875381},
51885382joinpd1("fopenmp-target-debug="),
51895383joinpd1("fsanitize-ignorelist="),
5384joinpd1("fzero-call-used-regs="),
51905385jspd1("iframeworkwithsysroot"),
51915386joinpd1("mcode-object-version="),
51925387joinpd1("mpad-max-prefix-size="),
......@@ -5218,6 +5413,7 @@ joinpd1("mwatchos-version-min="),
52185413 .psl = false,
52195414},
52205415joinpd1("faltivec-src-compat="),
5416joinpd1("mmacosx-version-min="),
52215417joinpd1("fsanitize-blacklist="),
52225418.{
52235419 .name = "hip-device-lib-path=",
......@@ -5230,12 +5426,13 @@ joinpd1("fsanitize-blacklist="),
52305426joinpd1("coverage-notes-file="),
52315427joinpd1("fbuild-session-file="),
52325428joinpd1("fdiagnostics-format="),
5429joinpd1("fgpu-default-stream="),
52335430joinpd1("fmax-stack-var-size="),
52345431joinpd1("fmodules-cache-path="),
52355432joinpd1("fmodules-embed-file="),
52365433joinpd1("fprofile-instrument="),
52375434joinpd1("fprofile-sample-use="),
5238joinpd1("mmacosx-version-min="),
5435joinpd1("fstrict-flex-arrays="),
52395436.{
52405437 .name = "no-cuda-include-ptx=",
52415438 .syntax = .joined,
......@@ -5249,6 +5446,7 @@ joinpd1("code-completion-at="),
52495446joinpd1("coverage-data-file="),
52505447joinpd1("fblas-matmul-limit="),
52515448joinpd1("fdiagnostics-color="),
5449joinpd1("femit-dwarf-unwind="),
52525450joinpd1("ffixed-line-length="),
52535451joinpd1("ffixed-line-length-"),
52545452joinpd1("ffuchsia-api-level="),
......@@ -5388,6 +5586,7 @@ joinpd1("fproc-stat-report"),
53885586joinpd1("fwarn-stack-size="),
53895587jspd1("iwithprefixbefore"),
53905588joinpd1("malign-functions="),
5589joinpd1("mfunction-return="),
53915590joinpd1("mios-version-min="),
53925591joinpd1("mstack-alignment="),
53935592joinpd1("msve-vector-bits="),
......@@ -5431,6 +5630,7 @@ joinpd1("debug-info-kind="),
54315630joinpd1("debugger-tuning="),
54325631joinpd1("exception-model="),
54335632joinpd1("fcf-runtime-abi="),
5633joinpd1("ffp-eval-method="),
54345634joinpd1("finit-character="),
54355635joinpd1("fmax-type-align="),
54365636joinpd1("fmemory-profile="),
......@@ -5478,6 +5678,14 @@ joinpd1("mlinker-version="),
54785678},
54795679jspd1("stdlib++-isystem"),
54805680joinpd1("Rpass-analysis="),
5681.{
5682 .name = "Xoffload-linker",
5683 .syntax = .joined_and_separate,
5684 .zig_equivalent = .other,
5685 .pd1 = true,
5686 .pd2 = false,
5687 .psl = false,
5688},
54815689.{
54825690 .name = "Xopenmp-target=",
54835691 .syntax = .joined_and_separate,
......@@ -5528,6 +5736,7 @@ joinpd1("fdepfile-entry="),
55285736joinpd1("fembed-bitcode="),
55295737joinpd1("finput-charset="),
55305738joinpd1("fmodule-format="),
5739joinpd1("fmodule-header="),
55315740joinpd1("fms-memptr-rep="),
55325741joinpd1("fnew-alignment="),
55335742joinpd1("frecord-marker="),
......@@ -5550,6 +5759,7 @@ joinpd1("ftrapv-handler="),
55505759 .pd2 = false,
55515760 .psl = false,
55525761},
5762joinpd1("gen-reproducer="),
55535763.{
55545764 .name = "hip-device-lib=",
55555765 .syntax = .joined,
......@@ -5683,6 +5893,14 @@ joinpd1("ast-dump-all="),
56835893 .pd2 = true,
56845894 .psl = false,
56855895},
5896.{
5897 .name = "cuda-feature=",
5898 .syntax = .joined,
5899 .zig_equivalent = .other,
5900 .pd1 = false,
5901 .pd2 = true,
5902 .psl = false,
5903},
56865904joinpd1("falign-jumps="),
56875905joinpd1("falign-loops="),
56885906joinpd1("faligned-new="),
......@@ -5710,6 +5928,7 @@ joinpd1("gsplit-dwarf="),
57105928jspd1("isystem-after"),
57115929joinpd1("malign-jumps="),
57125930joinpd1("malign-loops="),
5931joinpd1("mframe-chain="),
57135932joinpd1("mimplicit-it="),
57145933.{
57155934 .name = "offload-arch=",
......@@ -5720,6 +5939,14 @@ joinpd1("mimplicit-it="),
57205939 .psl = false,
57215940},
57225941jspd1("pagezero_size"),
5942.{
5943 .name = "product-name=",
5944 .syntax = .joined,
5945 .zig_equivalent = .other,
5946 .pd1 = false,
5947 .pd2 = true,
5948 .psl = false,
5949},
57235950joinpd1("resource-dir="),
57245951.{
57255952 .name = "dyld-prefix=",
......@@ -5741,6 +5968,7 @@ joinpd1("fmax-errors="),
57415968joinpd1("fmax-tokens="),
57425969joinpd1("fno-builtin-"),
57435970joinpd1("fplugin-arg-"),
5971joinpd1("ftime-trace="),
57445972joinpd1("fvisibility="),
57455973joinpd1("fwchar-type="),
57465974jspd1("fxray-modes="),
......@@ -5946,6 +6174,7 @@ joinpd1("flto-jobs="),
59466174},
59476175joinpd1("fuse-cuid="),
59486176jspd1("iframework"),
6177jspd1("module-dir"),
59496178joinpd1("mtargetos="),
59506179joinpd1("mtls-size="),
59516180.{
......@@ -6485,6 +6714,14 @@ joinpd1("mtp="),
64856714},
64866715joinpd1("gz="),
64876716joinpd1("A-"),
6717.{
6718 .name = "Fo",
6719 .syntax = .joined_or_separate,
6720 .zig_equivalent = .other,
6721 .pd1 = true,
6722 .pd2 = false,
6723 .psl = true,
6724},
64886725joinpd1("G="),
64896726.{
64906727 .name = "MF",
......@@ -6662,6 +6899,14 @@ joinpd1("G="),
66626899 .pd2 = false,
66636900 .psl = true,
66646901},
6902.{
6903 .name = "Wv",
6904 .syntax = .joined,
6905 .zig_equivalent = .other,
6906 .pd1 = true,
6907 .pd2 = false,
6908 .psl = true,
6909},
66656910.{
66666911 .name = "Yc",
66676912 .syntax = .joined,
......@@ -6861,6 +7106,14 @@ joinpd1("d"),
68617106 .pd2 = false,
68627107 .psl = false,
68637108},
7109.{
7110 .name = "T",
7111 .syntax = .joined_or_separate,
7112 .zig_equivalent = .linker_script,
7113 .pd1 = true,
7114 .pd2 = false,
7115 .psl = true,
7116},
68647117jspd1("u"),
68657118jspd1("x"),
68667119joinpd1("y"),
tools/update_clang_options.zig+18-12
......@@ -489,6 +489,7 @@ const cpu_targets = struct {
489489 pub const arm = std.Target.arm;
490490 pub const avr = std.Target.avr;
491491 pub const bpf = std.Target.bpf;
492 pub const csky = std.Target.csky;
492493 pub const hexagon = std.Target.hexagon;
493494 pub const mips = std.Target.mips;
494495 pub const msp430 = std.Target.msp430;
......@@ -497,7 +498,7 @@ const cpu_targets = struct {
497498 pub const riscv = std.Target.riscv;
498499 pub const sparc = std.Target.sparc;
499500 pub const spirv = std.Target.spirv;
500 pub const systemz = std.Target.systemz;
501 pub const s390x = std.Target.s390x;
501502 pub const ve = std.Target.ve;
502503 pub const wasm = std.Target.wasm;
503504 pub const x86 = std.Target.x86;
......@@ -630,7 +631,7 @@ pub fn main() anyerror!void {
630631 std.process.exit(1);
631632 }
632633 }
633 const syntax = objSyntax(obj);
634 const syntax = objSyntax(obj) orelse continue;
634635
635636 if (std.mem.eql(u8, name, "MT") and syntax == .flag) {
636637 // `-MT foo` is ambiguous because there is also an -MT flag
......@@ -647,9 +648,9 @@ pub fn main() anyerror!void {
647648 \\ .name = "{s}",
648649 \\ .syntax = {s},
649650 \\ .zig_equivalent = .{s},
650 \\ .pd1 = {s},
651 \\ .pd2 = {s},
652 \\ .psl = {s},
651 \\ .pd1 = {any},
652 \\ .pd2 = {any},
653 \\ .psl = {any},
653654 \\}},
654655 \\
655656 , .{ name, final_syntax, ident, pd1, pd2, pslash });
......@@ -677,9 +678,9 @@ pub fn main() anyerror!void {
677678 \\ .name = "{s}",
678679 \\ .syntax = {s},
679680 \\ .zig_equivalent = .other,
680 \\ .pd1 = {s},
681 \\ .pd2 = {s},
682 \\ .psl = {s},
681 \\ .pd1 = {any},
682 \\ .pd2 = {any},
683 \\ .psl = {any},
683684 \\}},
684685 \\
685686 , .{ name, syntax, pd1, pd2, pslash });
......@@ -736,7 +737,7 @@ const Syntax = union(enum) {
736737 }
737738};
738739
739fn objSyntax(obj: *json.ObjectMap) Syntax {
740fn objSyntax(obj: *json.ObjectMap) ?Syntax {
740741 const num_args = @intCast(u8, obj.get("NumArgs").?.Integer);
741742 for (obj.get("!superclasses").?.Array.items) |superclass_json| {
742743 const superclass = superclass_json.String;
......@@ -754,6 +755,10 @@ fn objSyntax(obj: *json.ObjectMap) Syntax {
754755 return .joined_or_separate;
755756 } else if (std.mem.eql(u8, superclass, "CLCompileJoinedOrSeparate")) {
756757 return .joined_or_separate;
758 } else if (std.mem.eql(u8, superclass, "DXCJoinedOrSeparate")) {
759 return .joined_or_separate;
760 } else if (std.mem.eql(u8, superclass, "CLDXCJoinedOrSeparate")) {
761 return .joined_or_separate;
757762 } else if (std.mem.eql(u8, superclass, "Flag")) {
758763 return .flag;
759764 } else if (std.mem.eql(u8, superclass, "CLFlag")) {
......@@ -787,7 +792,8 @@ fn objSyntax(obj: *json.ObjectMap) Syntax {
787792 for (obj.get("!superclasses").?.Array.items) |superclass_json| {
788793 std.debug.print(" {s}\n", .{superclass_json.String});
789794 }
790 std.process.exit(1);
795 //std.process.exit(1);
796 return null;
791797}
792798
793799fn syntaxMatchesWithEql(syntax: Syntax) bool {
......@@ -810,8 +816,8 @@ fn objectLessThan(context: void, a: *json.ObjectMap, b: *json.ObjectMap) bool {
810816 _ = context;
811817 // Priority is determined by exact matches first, followed by prefix matches in descending
812818 // length, with key as a final tiebreaker.
813 const a_syntax = objSyntax(a);
814 const b_syntax = objSyntax(b);
819 const a_syntax = objSyntax(a) orelse return false;
820 const b_syntax = objSyntax(b) orelse return true;
815821
816822 const a_match_with_eql = syntaxMatchesWithEql(a_syntax);
817823 const b_match_with_eql = syntaxMatchesWithEql(b_syntax);