authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-22 19:20:02-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-03-22 19:20:02-04:00
log7ffdf59c441380efd9bbb837de7ad5f2df747a6e
tree144ba6d47ce0d353f5ede2b61dfccaf51b2e0ace
parent9d19d9008eb70d069b799dd65a68bb410a5dff8e
parent2b65dc10328cc437b21114e3c87fac2ef6ef9adc
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #4774 from ziglang/zig-cc

ability to use `zig cc` as a drop-in C compiler

14 files changed, 6851 insertions(+), 24 deletions(-)

src-self-hosted/clang_options.zig created+126
......@@ -0,0 +1,126 @@
1const std = @import("std");
2const mem = std.mem;
3
4pub const list = @import("clang_options_data.zig").data;
5
6pub const CliArg = struct {
7 name: []const u8,
8 syntax: Syntax,
9
10 /// TODO we're going to want to change this when we start shipping self-hosted because this causes
11 /// all the functions in stage2.zig to get exported.
12 zig_equivalent: @import("stage2.zig").ClangArgIterator.ZigEquivalent,
13
14 /// Prefixed by "-"
15 pd1: bool = false,
16
17 /// Prefixed by "--"
18 pd2: bool = false,
19
20 /// Prefixed by "/"
21 psl: bool = false,
22
23 pub const Syntax = union(enum) {
24 /// A flag with no values.
25 flag,
26
27 /// An option which prefixes its (single) value.
28 joined,
29
30 /// An option which is followed by its value.
31 separate,
32
33 /// An option which is either joined to its (non-empty) value, or followed by its value.
34 joined_or_separate,
35
36 /// An option which is both joined to its (first) value, and followed by its (second) value.
37 joined_and_separate,
38
39 /// An option followed by its values, which are separated by commas.
40 comma_joined,
41
42 /// An option which consumes an optional joined argument and any other remaining arguments.
43 remaining_args_joined,
44
45 /// An option which is which takes multiple (separate) arguments.
46 multi_arg: u8,
47 };
48
49 pub fn matchEql(self: CliArg, arg: []const u8) u2 {
50 if (self.pd1 and arg.len >= self.name.len + 1 and
51 mem.startsWith(u8, arg, "-") and mem.eql(u8, arg[1..], self.name))
52 {
53 return 1;
54 }
55 if (self.pd2 and arg.len >= self.name.len + 2 and
56 mem.startsWith(u8, arg, "--") and mem.eql(u8, arg[2..], self.name))
57 {
58 return 2;
59 }
60 if (self.psl and arg.len >= self.name.len + 1 and
61 mem.startsWith(u8, arg, "/") and mem.eql(u8, arg[1..], self.name))
62 {
63 return 1;
64 }
65 return 0;
66 }
67
68 pub fn matchStartsWith(self: CliArg, arg: []const u8) usize {
69 if (self.pd1 and arg.len >= self.name.len + 1 and
70 mem.startsWith(u8, arg, "-") and mem.startsWith(u8, arg[1..], self.name))
71 {
72 return self.name.len + 1;
73 }
74 if (self.pd2 and arg.len >= self.name.len + 2 and
75 mem.startsWith(u8, arg, "--") and mem.startsWith(u8, arg[2..], self.name))
76 {
77 return self.name.len + 2;
78 }
79 if (self.psl and arg.len >= self.name.len + 1 and
80 mem.startsWith(u8, arg, "/") and mem.startsWith(u8, arg[1..], self.name))
81 {
82 return self.name.len + 1;
83 }
84 return 0;
85 }
86};
87
88/// Shortcut function for initializing a `CliArg`
89pub fn flagpd1(name: []const u8) CliArg {
90 return .{
91 .name = name,
92 .syntax = .flag,
93 .zig_equivalent = .other,
94 .pd1 = true,
95 };
96}
97
98/// Shortcut function for initializing a `CliArg`
99pub fn joinpd1(name: []const u8) CliArg {
100 return .{
101 .name = name,
102 .syntax = .joined,
103 .zig_equivalent = .other,
104 .pd1 = true,
105 };
106}
107
108/// Shortcut function for initializing a `CliArg`
109pub fn jspd1(name: []const u8) CliArg {
110 return .{
111 .name = name,
112 .syntax = .joined_or_separate,
113 .zig_equivalent = .other,
114 .pd1 = true,
115 };
116}
117
118/// Shortcut function for initializing a `CliArg`
119pub fn sepd1(name: []const u8) CliArg {
120 return .{
121 .name = name,
122 .syntax = .separate,
123 .zig_equivalent = .other,
124 .pd1 = true,
125 };
126}
src-self-hosted/clang_options_data.zig created+5702
......@@ -0,0 +1,5702 @@
1// This file is generated by tools/update_clang_options.zig.
2// zig fmt: off
3usingnamespace @import("clang_options.zig");
4pub const data = blk: { @setEvalBranchQuota(6000); break :blk &[_]CliArg{
5flagpd1("C"),
6flagpd1("CC"),
7.{
8 .name = "E",
9 .syntax = .flag,
10 .zig_equivalent = .preprocess,
11 .pd1 = true,
12 .pd2 = false,
13 .psl = false,
14},
15flagpd1("EB"),
16flagpd1("EL"),
17flagpd1("Eonly"),
18flagpd1("H"),
19.{
20 .name = "<input>",
21 .syntax = .flag,
22 .zig_equivalent = .other,
23 .pd1 = false,
24 .pd2 = false,
25 .psl = false,
26},
27flagpd1("I-"),
28flagpd1("M"),
29flagpd1("MD"),
30flagpd1("MG"),
31flagpd1("MM"),
32flagpd1("MMD"),
33flagpd1("MP"),
34flagpd1("MV"),
35flagpd1("Mach"),
36flagpd1("O0"),
37flagpd1("O4"),
38.{
39 .name = "O",
40 .syntax = .flag,
41 .zig_equivalent = .optimize,
42 .pd1 = true,
43 .pd2 = false,
44 .psl = false,
45},
46flagpd1("ObjC"),
47flagpd1("ObjC++"),
48flagpd1("P"),
49flagpd1("Q"),
50flagpd1("Qn"),
51flagpd1("Qunused-arguments"),
52flagpd1("Qy"),
53.{
54 .name = "S",
55 .syntax = .flag,
56 .zig_equivalent = .driver_punt,
57 .pd1 = true,
58 .pd2 = false,
59 .psl = false,
60},
61.{
62 .name = "<unknown>",
63 .syntax = .flag,
64 .zig_equivalent = .other,
65 .pd1 = false,
66 .pd2 = false,
67 .psl = false,
68},
69flagpd1("WCL4"),
70flagpd1("Wall"),
71flagpd1("Wdeprecated"),
72flagpd1("Wlarge-by-value-copy"),
73flagpd1("Wno-deprecated"),
74flagpd1("Wno-rewrite-macros"),
75flagpd1("Wno-write-strings"),
76flagpd1("Wwrite-strings"),
77flagpd1("X"),
78sepd1("Xanalyzer"),
79sepd1("Xassembler"),
80sepd1("Xclang"),
81sepd1("Xcuda-fatbinary"),
82sepd1("Xcuda-ptxas"),
83sepd1("Xlinker"),
84sepd1("Xopenmp-target"),
85sepd1("Xpreprocessor"),
86flagpd1("Z"),
87flagpd1("Z-Xlinker-no-demangle"),
88flagpd1("Z-reserved-lib-cckext"),
89flagpd1("Z-reserved-lib-stdc++"),
90sepd1("Zlinker-input"),
91.{
92 .name = "CLASSPATH",
93 .syntax = .separate,
94 .zig_equivalent = .other,
95 .pd1 = false,
96 .pd2 = true,
97 .psl = false,
98},
99flagpd1("###"),
100.{
101 .name = "Brepro",
102 .syntax = .flag,
103 .zig_equivalent = .other,
104 .pd1 = true,
105 .pd2 = false,
106 .psl = true,
107},
108.{
109 .name = "Brepro-",
110 .syntax = .flag,
111 .zig_equivalent = .other,
112 .pd1 = true,
113 .pd2 = false,
114 .psl = true,
115},
116.{
117 .name = "Bt",
118 .syntax = .flag,
119 .zig_equivalent = .other,
120 .pd1 = true,
121 .pd2 = false,
122 .psl = true,
123},
124.{
125 .name = "Bt+",
126 .syntax = .flag,
127 .zig_equivalent = .other,
128 .pd1 = true,
129 .pd2 = false,
130 .psl = true,
131},
132.{
133 .name = "C",
134 .syntax = .flag,
135 .zig_equivalent = .other,
136 .pd1 = true,
137 .pd2 = false,
138 .psl = true,
139},
140.{
141 .name = "E",
142 .syntax = .flag,
143 .zig_equivalent = .preprocess,
144 .pd1 = true,
145 .pd2 = false,
146 .psl = true,
147},
148.{
149 .name = "EP",
150 .syntax = .flag,
151 .zig_equivalent = .other,
152 .pd1 = true,
153 .pd2 = false,
154 .psl = true,
155},
156.{
157 .name = "FA",
158 .syntax = .flag,
159 .zig_equivalent = .other,
160 .pd1 = true,
161 .pd2 = false,
162 .psl = true,
163},
164.{
165 .name = "FC",
166 .syntax = .flag,
167 .zig_equivalent = .other,
168 .pd1 = true,
169 .pd2 = false,
170 .psl = true,
171},
172.{
173 .name = "FS",
174 .syntax = .flag,
175 .zig_equivalent = .other,
176 .pd1 = true,
177 .pd2 = false,
178 .psl = true,
179},
180.{
181 .name = "Fx",
182 .syntax = .flag,
183 .zig_equivalent = .other,
184 .pd1 = true,
185 .pd2 = false,
186 .psl = true,
187},
188.{
189 .name = "G1",
190 .syntax = .flag,
191 .zig_equivalent = .other,
192 .pd1 = true,
193 .pd2 = false,
194 .psl = true,
195},
196.{
197 .name = "G2",
198 .syntax = .flag,
199 .zig_equivalent = .other,
200 .pd1 = true,
201 .pd2 = false,
202 .psl = true,
203},
204.{
205 .name = "GA",
206 .syntax = .flag,
207 .zig_equivalent = .other,
208 .pd1 = true,
209 .pd2 = false,
210 .psl = true,
211},
212.{
213 .name = "GF",
214 .syntax = .flag,
215 .zig_equivalent = .other,
216 .pd1 = true,
217 .pd2 = false,
218 .psl = true,
219},
220.{
221 .name = "GF-",
222 .syntax = .flag,
223 .zig_equivalent = .other,
224 .pd1 = true,
225 .pd2 = false,
226 .psl = true,
227},
228.{
229 .name = "GH",
230 .syntax = .flag,
231 .zig_equivalent = .other,
232 .pd1 = true,
233 .pd2 = false,
234 .psl = true,
235},
236.{
237 .name = "GL",
238 .syntax = .flag,
239 .zig_equivalent = .other,
240 .pd1 = true,
241 .pd2 = false,
242 .psl = true,
243},
244.{
245 .name = "GL-",
246 .syntax = .flag,
247 .zig_equivalent = .other,
248 .pd1 = true,
249 .pd2 = false,
250 .psl = true,
251},
252.{
253 .name = "GR",
254 .syntax = .flag,
255 .zig_equivalent = .other,
256 .pd1 = true,
257 .pd2 = false,
258 .psl = true,
259},
260.{
261 .name = "GR-",
262 .syntax = .flag,
263 .zig_equivalent = .other,
264 .pd1 = true,
265 .pd2 = false,
266 .psl = true,
267},
268.{
269 .name = "GS",
270 .syntax = .flag,
271 .zig_equivalent = .other,
272 .pd1 = true,
273 .pd2 = false,
274 .psl = true,
275},
276.{
277 .name = "GS-",
278 .syntax = .flag,
279 .zig_equivalent = .other,
280 .pd1 = true,
281 .pd2 = false,
282 .psl = true,
283},
284.{
285 .name = "GT",
286 .syntax = .flag,
287 .zig_equivalent = .other,
288 .pd1 = true,
289 .pd2 = false,
290 .psl = true,
291},
292.{
293 .name = "GX",
294 .syntax = .flag,
295 .zig_equivalent = .other,
296 .pd1 = true,
297 .pd2 = false,
298 .psl = true,
299},
300.{
301 .name = "GX-",
302 .syntax = .flag,
303 .zig_equivalent = .other,
304 .pd1 = true,
305 .pd2 = false,
306 .psl = true,
307},
308.{
309 .name = "GZ",
310 .syntax = .flag,
311 .zig_equivalent = .other,
312 .pd1 = true,
313 .pd2 = false,
314 .psl = true,
315},
316.{
317 .name = "Gd",
318 .syntax = .flag,
319 .zig_equivalent = .other,
320 .pd1 = true,
321 .pd2 = false,
322 .psl = true,
323},
324.{
325 .name = "Ge",
326 .syntax = .flag,
327 .zig_equivalent = .other,
328 .pd1 = true,
329 .pd2 = false,
330 .psl = true,
331},
332.{
333 .name = "Gh",
334 .syntax = .flag,
335 .zig_equivalent = .other,
336 .pd1 = true,
337 .pd2 = false,
338 .psl = true,
339},
340.{
341 .name = "Gm",
342 .syntax = .flag,
343 .zig_equivalent = .other,
344 .pd1 = true,
345 .pd2 = false,
346 .psl = true,
347},
348.{
349 .name = "Gm-",
350 .syntax = .flag,
351 .zig_equivalent = .other,
352 .pd1 = true,
353 .pd2 = false,
354 .psl = true,
355},
356.{
357 .name = "Gr",
358 .syntax = .flag,
359 .zig_equivalent = .other,
360 .pd1 = true,
361 .pd2 = false,
362 .psl = true,
363},
364.{
365 .name = "Gregcall",
366 .syntax = .flag,
367 .zig_equivalent = .other,
368 .pd1 = true,
369 .pd2 = false,
370 .psl = true,
371},
372.{
373 .name = "Gv",
374 .syntax = .flag,
375 .zig_equivalent = .other,
376 .pd1 = true,
377 .pd2 = false,
378 .psl = true,
379},
380.{
381 .name = "Gw",
382 .syntax = .flag,
383 .zig_equivalent = .other,
384 .pd1 = true,
385 .pd2 = false,
386 .psl = true,
387},
388.{
389 .name = "Gw-",
390 .syntax = .flag,
391 .zig_equivalent = .other,
392 .pd1 = true,
393 .pd2 = false,
394 .psl = true,
395},
396.{
397 .name = "Gy",
398 .syntax = .flag,
399 .zig_equivalent = .other,
400 .pd1 = true,
401 .pd2 = false,
402 .psl = true,
403},
404.{
405 .name = "Gy-",
406 .syntax = .flag,
407 .zig_equivalent = .other,
408 .pd1 = true,
409 .pd2 = false,
410 .psl = true,
411},
412.{
413 .name = "Gz",
414 .syntax = .flag,
415 .zig_equivalent = .other,
416 .pd1 = true,
417 .pd2 = false,
418 .psl = true,
419},
420.{
421 .name = "H",
422 .syntax = .flag,
423 .zig_equivalent = .other,
424 .pd1 = true,
425 .pd2 = false,
426 .psl = true,
427},
428.{
429 .name = "HELP",
430 .syntax = .flag,
431 .zig_equivalent = .other,
432 .pd1 = true,
433 .pd2 = false,
434 .psl = true,
435},
436.{
437 .name = "J",
438 .syntax = .flag,
439 .zig_equivalent = .other,
440 .pd1 = true,
441 .pd2 = false,
442 .psl = true,
443},
444.{
445 .name = "JMC",
446 .syntax = .flag,
447 .zig_equivalent = .other,
448 .pd1 = true,
449 .pd2 = false,
450 .psl = true,
451},
452.{
453 .name = "LD",
454 .syntax = .flag,
455 .zig_equivalent = .other,
456 .pd1 = true,
457 .pd2 = false,
458 .psl = true,
459},
460.{
461 .name = "LDd",
462 .syntax = .flag,
463 .zig_equivalent = .other,
464 .pd1 = true,
465 .pd2 = false,
466 .psl = true,
467},
468.{
469 .name = "LN",
470 .syntax = .flag,
471 .zig_equivalent = .other,
472 .pd1 = true,
473 .pd2 = false,
474 .psl = true,
475},
476.{
477 .name = "MD",
478 .syntax = .flag,
479 .zig_equivalent = .other,
480 .pd1 = true,
481 .pd2 = false,
482 .psl = true,
483},
484.{
485 .name = "MDd",
486 .syntax = .flag,
487 .zig_equivalent = .other,
488 .pd1 = true,
489 .pd2 = false,
490 .psl = true,
491},
492.{
493 .name = "MT",
494 .syntax = .flag,
495 .zig_equivalent = .other,
496 .pd1 = true,
497 .pd2 = false,
498 .psl = true,
499},
500.{
501 .name = "MTd",
502 .syntax = .flag,
503 .zig_equivalent = .other,
504 .pd1 = true,
505 .pd2 = false,
506 .psl = true,
507},
508.{
509 .name = "P",
510 .syntax = .flag,
511 .zig_equivalent = .other,
512 .pd1 = true,
513 .pd2 = false,
514 .psl = true,
515},
516.{
517 .name = "QIfist",
518 .syntax = .flag,
519 .zig_equivalent = .other,
520 .pd1 = true,
521 .pd2 = false,
522 .psl = true,
523},
524.{
525 .name = "?",
526 .syntax = .flag,
527 .zig_equivalent = .other,
528 .pd1 = true,
529 .pd2 = false,
530 .psl = true,
531},
532.{
533 .name = "Qfast_transcendentals",
534 .syntax = .flag,
535 .zig_equivalent = .other,
536 .pd1 = true,
537 .pd2 = false,
538 .psl = true,
539},
540.{
541 .name = "Qimprecise_fwaits",
542 .syntax = .flag,
543 .zig_equivalent = .other,
544 .pd1 = true,
545 .pd2 = false,
546 .psl = true,
547},
548.{
549 .name = "Qpar",
550 .syntax = .flag,
551 .zig_equivalent = .other,
552 .pd1 = true,
553 .pd2 = false,
554 .psl = true,
555},
556.{
557 .name = "Qsafe_fp_loads",
558 .syntax = .flag,
559 .zig_equivalent = .other,
560 .pd1 = true,
561 .pd2 = false,
562 .psl = true,
563},
564.{
565 .name = "Qspectre",
566 .syntax = .flag,
567 .zig_equivalent = .other,
568 .pd1 = true,
569 .pd2 = false,
570 .psl = true,
571},
572.{
573 .name = "Qvec",
574 .syntax = .flag,
575 .zig_equivalent = .other,
576 .pd1 = true,
577 .pd2 = false,
578 .psl = true,
579},
580.{
581 .name = "Qvec-",
582 .syntax = .flag,
583 .zig_equivalent = .other,
584 .pd1 = true,
585 .pd2 = false,
586 .psl = true,
587},
588.{
589 .name = "TC",
590 .syntax = .flag,
591 .zig_equivalent = .other,
592 .pd1 = true,
593 .pd2 = false,
594 .psl = true,
595},
596.{
597 .name = "TP",
598 .syntax = .flag,
599 .zig_equivalent = .other,
600 .pd1 = true,
601 .pd2 = false,
602 .psl = true,
603},
604.{
605 .name = "V",
606 .syntax = .flag,
607 .zig_equivalent = .other,
608 .pd1 = true,
609 .pd2 = false,
610 .psl = true,
611},
612.{
613 .name = "W0",
614 .syntax = .flag,
615 .zig_equivalent = .other,
616 .pd1 = true,
617 .pd2 = false,
618 .psl = true,
619},
620.{
621 .name = "W1",
622 .syntax = .flag,
623 .zig_equivalent = .other,
624 .pd1 = true,
625 .pd2 = false,
626 .psl = true,
627},
628.{
629 .name = "W2",
630 .syntax = .flag,
631 .zig_equivalent = .other,
632 .pd1 = true,
633 .pd2 = false,
634 .psl = true,
635},
636.{
637 .name = "W3",
638 .syntax = .flag,
639 .zig_equivalent = .other,
640 .pd1 = true,
641 .pd2 = false,
642 .psl = true,
643},
644.{
645 .name = "W4",
646 .syntax = .flag,
647 .zig_equivalent = .other,
648 .pd1 = true,
649 .pd2 = false,
650 .psl = true,
651},
652.{
653 .name = "WL",
654 .syntax = .flag,
655 .zig_equivalent = .other,
656 .pd1 = true,
657 .pd2 = false,
658 .psl = true,
659},
660.{
661 .name = "WX",
662 .syntax = .flag,
663 .zig_equivalent = .other,
664 .pd1 = true,
665 .pd2 = false,
666 .psl = true,
667},
668.{
669 .name = "WX-",
670 .syntax = .flag,
671 .zig_equivalent = .other,
672 .pd1 = true,
673 .pd2 = false,
674 .psl = true,
675},
676.{
677 .name = "Wall",
678 .syntax = .flag,
679 .zig_equivalent = .other,
680 .pd1 = true,
681 .pd2 = false,
682 .psl = true,
683},
684.{
685 .name = "Wp64",
686 .syntax = .flag,
687 .zig_equivalent = .other,
688 .pd1 = true,
689 .pd2 = false,
690 .psl = true,
691},
692.{
693 .name = "X",
694 .syntax = .flag,
695 .zig_equivalent = .other,
696 .pd1 = true,
697 .pd2 = false,
698 .psl = true,
699},
700.{
701 .name = "Y-",
702 .syntax = .flag,
703 .zig_equivalent = .other,
704 .pd1 = true,
705 .pd2 = false,
706 .psl = true,
707},
708.{
709 .name = "Yd",
710 .syntax = .flag,
711 .zig_equivalent = .other,
712 .pd1 = true,
713 .pd2 = false,
714 .psl = true,
715},
716.{
717 .name = "Z7",
718 .syntax = .flag,
719 .zig_equivalent = .other,
720 .pd1 = true,
721 .pd2 = false,
722 .psl = true,
723},
724.{
725 .name = "ZH:MD5",
726 .syntax = .flag,
727 .zig_equivalent = .other,
728 .pd1 = true,
729 .pd2 = false,
730 .psl = true,
731},
732.{
733 .name = "ZH:SHA1",
734 .syntax = .flag,
735 .zig_equivalent = .other,
736 .pd1 = true,
737 .pd2 = false,
738 .psl = true,
739},
740.{
741 .name = "ZH:SHA_256",
742 .syntax = .flag,
743 .zig_equivalent = .other,
744 .pd1 = true,
745 .pd2 = false,
746 .psl = true,
747},
748.{
749 .name = "ZI",
750 .syntax = .flag,
751 .zig_equivalent = .other,
752 .pd1 = true,
753 .pd2 = false,
754 .psl = true,
755},
756.{
757 .name = "Za",
758 .syntax = .flag,
759 .zig_equivalent = .other,
760 .pd1 = true,
761 .pd2 = false,
762 .psl = true,
763},
764.{
765 .name = "Zc:__cplusplus",
766 .syntax = .flag,
767 .zig_equivalent = .other,
768 .pd1 = true,
769 .pd2 = false,
770 .psl = true,
771},
772.{
773 .name = "Zc:alignedNew",
774 .syntax = .flag,
775 .zig_equivalent = .other,
776 .pd1 = true,
777 .pd2 = false,
778 .psl = true,
779},
780.{
781 .name = "Zc:alignedNew-",
782 .syntax = .flag,
783 .zig_equivalent = .other,
784 .pd1 = true,
785 .pd2 = false,
786 .psl = true,
787},
788.{
789 .name = "Zc:auto",
790 .syntax = .flag,
791 .zig_equivalent = .other,
792 .pd1 = true,
793 .pd2 = false,
794 .psl = true,
795},
796.{
797 .name = "Zc:char8_t",
798 .syntax = .flag,
799 .zig_equivalent = .other,
800 .pd1 = true,
801 .pd2 = false,
802 .psl = true,
803},
804.{
805 .name = "Zc:char8_t-",
806 .syntax = .flag,
807 .zig_equivalent = .other,
808 .pd1 = true,
809 .pd2 = false,
810 .psl = true,
811},
812.{
813 .name = "Zc:dllexportInlines",
814 .syntax = .flag,
815 .zig_equivalent = .other,
816 .pd1 = true,
817 .pd2 = false,
818 .psl = true,
819},
820.{
821 .name = "Zc:dllexportInlines-",
822 .syntax = .flag,
823 .zig_equivalent = .other,
824 .pd1 = true,
825 .pd2 = false,
826 .psl = true,
827},
828.{
829 .name = "Zc:forScope",
830 .syntax = .flag,
831 .zig_equivalent = .other,
832 .pd1 = true,
833 .pd2 = false,
834 .psl = true,
835},
836.{
837 .name = "Zc:inline",
838 .syntax = .flag,
839 .zig_equivalent = .other,
840 .pd1 = true,
841 .pd2 = false,
842 .psl = true,
843},
844.{
845 .name = "Zc:rvalueCast",
846 .syntax = .flag,
847 .zig_equivalent = .other,
848 .pd1 = true,
849 .pd2 = false,
850 .psl = true,
851},
852.{
853 .name = "Zc:sizedDealloc",
854 .syntax = .flag,
855 .zig_equivalent = .other,
856 .pd1 = true,
857 .pd2 = false,
858 .psl = true,
859},
860.{
861 .name = "Zc:sizedDealloc-",
862 .syntax = .flag,
863 .zig_equivalent = .other,
864 .pd1 = true,
865 .pd2 = false,
866 .psl = true,
867},
868.{
869 .name = "Zc:strictStrings",
870 .syntax = .flag,
871 .zig_equivalent = .other,
872 .pd1 = true,
873 .pd2 = false,
874 .psl = true,
875},
876.{
877 .name = "Zc:ternary",
878 .syntax = .flag,
879 .zig_equivalent = .other,
880 .pd1 = true,
881 .pd2 = false,
882 .psl = true,
883},
884.{
885 .name = "Zc:threadSafeInit",
886 .syntax = .flag,
887 .zig_equivalent = .other,
888 .pd1 = true,
889 .pd2 = false,
890 .psl = true,
891},
892.{
893 .name = "Zc:threadSafeInit-",
894 .syntax = .flag,
895 .zig_equivalent = .other,
896 .pd1 = true,
897 .pd2 = false,
898 .psl = true,
899},
900.{
901 .name = "Zc:trigraphs",
902 .syntax = .flag,
903 .zig_equivalent = .other,
904 .pd1 = true,
905 .pd2 = false,
906 .psl = true,
907},
908.{
909 .name = "Zc:trigraphs-",
910 .syntax = .flag,
911 .zig_equivalent = .other,
912 .pd1 = true,
913 .pd2 = false,
914 .psl = true,
915},
916.{
917 .name = "Zc:twoPhase",
918 .syntax = .flag,
919 .zig_equivalent = .other,
920 .pd1 = true,
921 .pd2 = false,
922 .psl = true,
923},
924.{
925 .name = "Zc:twoPhase-",
926 .syntax = .flag,
927 .zig_equivalent = .other,
928 .pd1 = true,
929 .pd2 = false,
930 .psl = true,
931},
932.{
933 .name = "Zc:wchar_t",
934 .syntax = .flag,
935 .zig_equivalent = .other,
936 .pd1 = true,
937 .pd2 = false,
938 .psl = true,
939},
940.{
941 .name = "Zd",
942 .syntax = .flag,
943 .zig_equivalent = .other,
944 .pd1 = true,
945 .pd2 = false,
946 .psl = true,
947},
948.{
949 .name = "Ze",
950 .syntax = .flag,
951 .zig_equivalent = .other,
952 .pd1 = true,
953 .pd2 = false,
954 .psl = true,
955},
956.{
957 .name = "Zg",
958 .syntax = .flag,
959 .zig_equivalent = .other,
960 .pd1 = true,
961 .pd2 = false,
962 .psl = true,
963},
964.{
965 .name = "Zi",
966 .syntax = .flag,
967 .zig_equivalent = .other,
968 .pd1 = true,
969 .pd2 = false,
970 .psl = true,
971},
972.{
973 .name = "Zl",
974 .syntax = .flag,
975 .zig_equivalent = .other,
976 .pd1 = true,
977 .pd2 = false,
978 .psl = true,
979},
980.{
981 .name = "Zo",
982 .syntax = .flag,
983 .zig_equivalent = .other,
984 .pd1 = true,
985 .pd2 = false,
986 .psl = true,
987},
988.{
989 .name = "Zo-",
990 .syntax = .flag,
991 .zig_equivalent = .other,
992 .pd1 = true,
993 .pd2 = false,
994 .psl = true,
995},
996.{
997 .name = "Zp",
998 .syntax = .flag,
999 .zig_equivalent = .other,
1000 .pd1 = true,
1001 .pd2 = false,
1002 .psl = true,
1003},
1004.{
1005 .name = "Zs",
1006 .syntax = .flag,
1007 .zig_equivalent = .other,
1008 .pd1 = true,
1009 .pd2 = false,
1010 .psl = true,
1011},
1012.{
1013 .name = "analyze-",
1014 .syntax = .flag,
1015 .zig_equivalent = .other,
1016 .pd1 = true,
1017 .pd2 = false,
1018 .psl = true,
1019},
1020.{
1021 .name = "await",
1022 .syntax = .flag,
1023 .zig_equivalent = .other,
1024 .pd1 = true,
1025 .pd2 = false,
1026 .psl = true,
1027},
1028.{
1029 .name = "bigobj",
1030 .syntax = .flag,
1031 .zig_equivalent = .other,
1032 .pd1 = true,
1033 .pd2 = false,
1034 .psl = true,
1035},
1036.{
1037 .name = "c",
1038 .syntax = .flag,
1039 .zig_equivalent = .c,
1040 .pd1 = true,
1041 .pd2 = false,
1042 .psl = true,
1043},
1044.{
1045 .name = "d1PP",
1046 .syntax = .flag,
1047 .zig_equivalent = .other,
1048 .pd1 = true,
1049 .pd2 = false,
1050 .psl = true,
1051},
1052.{
1053 .name = "d1reportAllClassLayout",
1054 .syntax = .flag,
1055 .zig_equivalent = .other,
1056 .pd1 = true,
1057 .pd2 = false,
1058 .psl = true,
1059},
1060.{
1061 .name = "d2FastFail",
1062 .syntax = .flag,
1063 .zig_equivalent = .other,
1064 .pd1 = true,
1065 .pd2 = false,
1066 .psl = true,
1067},
1068.{
1069 .name = "d2Zi+",
1070 .syntax = .flag,
1071 .zig_equivalent = .other,
1072 .pd1 = true,
1073 .pd2 = false,
1074 .psl = true,
1075},
1076.{
1077 .name = "diagnostics:caret",
1078 .syntax = .flag,
1079 .zig_equivalent = .other,
1080 .pd1 = true,
1081 .pd2 = false,
1082 .psl = true,
1083},
1084.{
1085 .name = "diagnostics:classic",
1086 .syntax = .flag,
1087 .zig_equivalent = .other,
1088 .pd1 = true,
1089 .pd2 = false,
1090 .psl = true,
1091},
1092.{
1093 .name = "diagnostics:column",
1094 .syntax = .flag,
1095 .zig_equivalent = .other,
1096 .pd1 = true,
1097 .pd2 = false,
1098 .psl = true,
1099},
1100.{
1101 .name = "fallback",
1102 .syntax = .flag,
1103 .zig_equivalent = .other,
1104 .pd1 = true,
1105 .pd2 = false,
1106 .psl = true,
1107},
1108.{
1109 .name = "fp:except",
1110 .syntax = .flag,
1111 .zig_equivalent = .other,
1112 .pd1 = true,
1113 .pd2 = false,
1114 .psl = true,
1115},
1116.{
1117 .name = "fp:except-",
1118 .syntax = .flag,
1119 .zig_equivalent = .other,
1120 .pd1 = true,
1121 .pd2 = false,
1122 .psl = true,
1123},
1124.{
1125 .name = "fp:fast",
1126 .syntax = .flag,
1127 .zig_equivalent = .other,
1128 .pd1 = true,
1129 .pd2 = false,
1130 .psl = true,
1131},
1132.{
1133 .name = "fp:precise",
1134 .syntax = .flag,
1135 .zig_equivalent = .other,
1136 .pd1 = true,
1137 .pd2 = false,
1138 .psl = true,
1139},
1140.{
1141 .name = "fp:strict",
1142 .syntax = .flag,
1143 .zig_equivalent = .other,
1144 .pd1 = true,
1145 .pd2 = false,
1146 .psl = true,
1147},
1148.{
1149 .name = "help",
1150 .syntax = .flag,
1151 .zig_equivalent = .driver_punt,
1152 .pd1 = true,
1153 .pd2 = false,
1154 .psl = true,
1155},
1156.{
1157 .name = "homeparams",
1158 .syntax = .flag,
1159 .zig_equivalent = .other,
1160 .pd1 = true,
1161 .pd2 = false,
1162 .psl = true,
1163},
1164.{
1165 .name = "hotpatch",
1166 .syntax = .flag,
1167 .zig_equivalent = .other,
1168 .pd1 = true,
1169 .pd2 = false,
1170 .psl = true,
1171},
1172.{
1173 .name = "kernel",
1174 .syntax = .flag,
1175 .zig_equivalent = .other,
1176 .pd1 = true,
1177 .pd2 = false,
1178 .psl = true,
1179},
1180.{
1181 .name = "kernel-",
1182 .syntax = .flag,
1183 .zig_equivalent = .other,
1184 .pd1 = true,
1185 .pd2 = false,
1186 .psl = true,
1187},
1188.{
1189 .name = "nologo",
1190 .syntax = .flag,
1191 .zig_equivalent = .other,
1192 .pd1 = true,
1193 .pd2 = false,
1194 .psl = true,
1195},
1196.{
1197 .name = "openmp",
1198 .syntax = .flag,
1199 .zig_equivalent = .other,
1200 .pd1 = true,
1201 .pd2 = false,
1202 .psl = true,
1203},
1204.{
1205 .name = "openmp-",
1206 .syntax = .flag,
1207 .zig_equivalent = .other,
1208 .pd1 = true,
1209 .pd2 = false,
1210 .psl = true,
1211},
1212.{
1213 .name = "openmp:experimental",
1214 .syntax = .flag,
1215 .zig_equivalent = .other,
1216 .pd1 = true,
1217 .pd2 = false,
1218 .psl = true,
1219},
1220.{
1221 .name = "permissive-",
1222 .syntax = .flag,
1223 .zig_equivalent = .other,
1224 .pd1 = true,
1225 .pd2 = false,
1226 .psl = true,
1227},
1228.{
1229 .name = "sdl",
1230 .syntax = .flag,
1231 .zig_equivalent = .other,
1232 .pd1 = true,
1233 .pd2 = false,
1234 .psl = true,
1235},
1236.{
1237 .name = "sdl-",
1238 .syntax = .flag,
1239 .zig_equivalent = .other,
1240 .pd1 = true,
1241 .pd2 = false,
1242 .psl = true,
1243},
1244.{
1245 .name = "showFilenames",
1246 .syntax = .flag,
1247 .zig_equivalent = .other,
1248 .pd1 = true,
1249 .pd2 = false,
1250 .psl = true,
1251},
1252.{
1253 .name = "showFilenames-",
1254 .syntax = .flag,
1255 .zig_equivalent = .other,
1256 .pd1 = true,
1257 .pd2 = false,
1258 .psl = true,
1259},
1260.{
1261 .name = "showIncludes",
1262 .syntax = .flag,
1263 .zig_equivalent = .other,
1264 .pd1 = true,
1265 .pd2 = false,
1266 .psl = true,
1267},
1268.{
1269 .name = "u",
1270 .syntax = .flag,
1271 .zig_equivalent = .other,
1272 .pd1 = true,
1273 .pd2 = false,
1274 .psl = true,
1275},
1276.{
1277 .name = "utf-8",
1278 .syntax = .flag,
1279 .zig_equivalent = .other,
1280 .pd1 = true,
1281 .pd2 = false,
1282 .psl = true,
1283},
1284.{
1285 .name = "validate-charset",
1286 .syntax = .flag,
1287 .zig_equivalent = .other,
1288 .pd1 = true,
1289 .pd2 = false,
1290 .psl = true,
1291},
1292.{
1293 .name = "validate-charset-",
1294 .syntax = .flag,
1295 .zig_equivalent = .other,
1296 .pd1 = true,
1297 .pd2 = false,
1298 .psl = true,
1299},
1300.{
1301 .name = "vmb",
1302 .syntax = .flag,
1303 .zig_equivalent = .other,
1304 .pd1 = true,
1305 .pd2 = false,
1306 .psl = true,
1307},
1308.{
1309 .name = "vmg",
1310 .syntax = .flag,
1311 .zig_equivalent = .other,
1312 .pd1 = true,
1313 .pd2 = false,
1314 .psl = true,
1315},
1316.{
1317 .name = "vmm",
1318 .syntax = .flag,
1319 .zig_equivalent = .other,
1320 .pd1 = true,
1321 .pd2 = false,
1322 .psl = true,
1323},
1324.{
1325 .name = "vms",
1326 .syntax = .flag,
1327 .zig_equivalent = .other,
1328 .pd1 = true,
1329 .pd2 = false,
1330 .psl = true,
1331},
1332.{
1333 .name = "vmv",
1334 .syntax = .flag,
1335 .zig_equivalent = .other,
1336 .pd1 = true,
1337 .pd2 = false,
1338 .psl = true,
1339},
1340.{
1341 .name = "volatile:iso",
1342 .syntax = .flag,
1343 .zig_equivalent = .other,
1344 .pd1 = true,
1345 .pd2 = false,
1346 .psl = true,
1347},
1348.{
1349 .name = "volatile:ms",
1350 .syntax = .flag,
1351 .zig_equivalent = .other,
1352 .pd1 = true,
1353 .pd2 = false,
1354 .psl = true,
1355},
1356.{
1357 .name = "w",
1358 .syntax = .flag,
1359 .zig_equivalent = .other,
1360 .pd1 = true,
1361 .pd2 = false,
1362 .psl = true,
1363},
1364.{
1365 .name = "wd4005",
1366 .syntax = .flag,
1367 .zig_equivalent = .other,
1368 .pd1 = true,
1369 .pd2 = false,
1370 .psl = true,
1371},
1372.{
1373 .name = "wd4018",
1374 .syntax = .flag,
1375 .zig_equivalent = .other,
1376 .pd1 = true,
1377 .pd2 = false,
1378 .psl = true,
1379},
1380.{
1381 .name = "wd4100",
1382 .syntax = .flag,
1383 .zig_equivalent = .other,
1384 .pd1 = true,
1385 .pd2 = false,
1386 .psl = true,
1387},
1388.{
1389 .name = "wd4910",
1390 .syntax = .flag,
1391 .zig_equivalent = .other,
1392 .pd1 = true,
1393 .pd2 = false,
1394 .psl = true,
1395},
1396.{
1397 .name = "wd4996",
1398 .syntax = .flag,
1399 .zig_equivalent = .other,
1400 .pd1 = true,
1401 .pd2 = false,
1402 .psl = true,
1403},
1404.{
1405 .name = "all-warnings",
1406 .syntax = .flag,
1407 .zig_equivalent = .other,
1408 .pd1 = false,
1409 .pd2 = true,
1410 .psl = false,
1411},
1412.{
1413 .name = "analyze",
1414 .syntax = .flag,
1415 .zig_equivalent = .other,
1416 .pd1 = false,
1417 .pd2 = true,
1418 .psl = false,
1419},
1420.{
1421 .name = "analyzer-no-default-checks",
1422 .syntax = .flag,
1423 .zig_equivalent = .other,
1424 .pd1 = false,
1425 .pd2 = true,
1426 .psl = false,
1427},
1428.{
1429 .name = "assemble",
1430 .syntax = .flag,
1431 .zig_equivalent = .driver_punt,
1432 .pd1 = false,
1433 .pd2 = true,
1434 .psl = false,
1435},
1436.{
1437 .name = "assert",
1438 .syntax = .separate,
1439 .zig_equivalent = .other,
1440 .pd1 = false,
1441 .pd2 = true,
1442 .psl = false,
1443},
1444.{
1445 .name = "bootclasspath",
1446 .syntax = .separate,
1447 .zig_equivalent = .other,
1448 .pd1 = false,
1449 .pd2 = true,
1450 .psl = false,
1451},
1452.{
1453 .name = "classpath",
1454 .syntax = .separate,
1455 .zig_equivalent = .other,
1456 .pd1 = false,
1457 .pd2 = true,
1458 .psl = false,
1459},
1460.{
1461 .name = "comments",
1462 .syntax = .flag,
1463 .zig_equivalent = .other,
1464 .pd1 = false,
1465 .pd2 = true,
1466 .psl = false,
1467},
1468.{
1469 .name = "comments-in-macros",
1470 .syntax = .flag,
1471 .zig_equivalent = .other,
1472 .pd1 = false,
1473 .pd2 = true,
1474 .psl = false,
1475},
1476.{
1477 .name = "compile",
1478 .syntax = .flag,
1479 .zig_equivalent = .other,
1480 .pd1 = false,
1481 .pd2 = true,
1482 .psl = false,
1483},
1484.{
1485 .name = "constant-cfstrings",
1486 .syntax = .flag,
1487 .zig_equivalent = .other,
1488 .pd1 = false,
1489 .pd2 = true,
1490 .psl = false,
1491},
1492.{
1493 .name = "debug",
1494 .syntax = .flag,
1495 .zig_equivalent = .debug,
1496 .pd1 = false,
1497 .pd2 = true,
1498 .psl = false,
1499},
1500.{
1501 .name = "define-macro",
1502 .syntax = .separate,
1503 .zig_equivalent = .other,
1504 .pd1 = false,
1505 .pd2 = true,
1506 .psl = false,
1507},
1508.{
1509 .name = "dependencies",
1510 .syntax = .flag,
1511 .zig_equivalent = .other,
1512 .pd1 = false,
1513 .pd2 = true,
1514 .psl = false,
1515},
1516.{
1517 .name = "dyld-prefix",
1518 .syntax = .separate,
1519 .zig_equivalent = .other,
1520 .pd1 = false,
1521 .pd2 = true,
1522 .psl = false,
1523},
1524.{
1525 .name = "encoding",
1526 .syntax = .separate,
1527 .zig_equivalent = .other,
1528 .pd1 = false,
1529 .pd2 = true,
1530 .psl = false,
1531},
1532.{
1533 .name = "entry",
1534 .syntax = .flag,
1535 .zig_equivalent = .other,
1536 .pd1 = false,
1537 .pd2 = true,
1538 .psl = false,
1539},
1540.{
1541 .name = "extdirs",
1542 .syntax = .separate,
1543 .zig_equivalent = .other,
1544 .pd1 = false,
1545 .pd2 = true,
1546 .psl = false,
1547},
1548.{
1549 .name = "extra-warnings",
1550 .syntax = .flag,
1551 .zig_equivalent = .other,
1552 .pd1 = false,
1553 .pd2 = true,
1554 .psl = false,
1555},
1556.{
1557 .name = "for-linker",
1558 .syntax = .separate,
1559 .zig_equivalent = .other,
1560 .pd1 = false,
1561 .pd2 = true,
1562 .psl = false,
1563},
1564.{
1565 .name = "force-link",
1566 .syntax = .separate,
1567 .zig_equivalent = .other,
1568 .pd1 = false,
1569 .pd2 = true,
1570 .psl = false,
1571},
1572.{
1573 .name = "help-hidden",
1574 .syntax = .flag,
1575 .zig_equivalent = .other,
1576 .pd1 = false,
1577 .pd2 = true,
1578 .psl = false,
1579},
1580.{
1581 .name = "include-barrier",
1582 .syntax = .flag,
1583 .zig_equivalent = .other,
1584 .pd1 = false,
1585 .pd2 = true,
1586 .psl = false,
1587},
1588.{
1589 .name = "include-directory",
1590 .syntax = .separate,
1591 .zig_equivalent = .other,
1592 .pd1 = false,
1593 .pd2 = true,
1594 .psl = false,
1595},
1596.{
1597 .name = "include-directory-after",
1598 .syntax = .separate,
1599 .zig_equivalent = .other,
1600 .pd1 = false,
1601 .pd2 = true,
1602 .psl = false,
1603},
1604.{
1605 .name = "include-prefix",
1606 .syntax = .separate,
1607 .zig_equivalent = .other,
1608 .pd1 = false,
1609 .pd2 = true,
1610 .psl = false,
1611},
1612.{
1613 .name = "include-with-prefix",
1614 .syntax = .separate,
1615 .zig_equivalent = .other,
1616 .pd1 = false,
1617 .pd2 = true,
1618 .psl = false,
1619},
1620.{
1621 .name = "include-with-prefix-after",
1622 .syntax = .separate,
1623 .zig_equivalent = .other,
1624 .pd1 = false,
1625 .pd2 = true,
1626 .psl = false,
1627},
1628.{
1629 .name = "include-with-prefix-before",
1630 .syntax = .separate,
1631 .zig_equivalent = .other,
1632 .pd1 = false,
1633 .pd2 = true,
1634 .psl = false,
1635},
1636.{
1637 .name = "language",
1638 .syntax = .separate,
1639 .zig_equivalent = .other,
1640 .pd1 = false,
1641 .pd2 = true,
1642 .psl = false,
1643},
1644.{
1645 .name = "library-directory",
1646 .syntax = .separate,
1647 .zig_equivalent = .other,
1648 .pd1 = false,
1649 .pd2 = true,
1650 .psl = false,
1651},
1652.{
1653 .name = "mhwdiv",
1654 .syntax = .separate,
1655 .zig_equivalent = .other,
1656 .pd1 = false,
1657 .pd2 = true,
1658 .psl = false,
1659},
1660.{
1661 .name = "migrate",
1662 .syntax = .flag,
1663 .zig_equivalent = .other,
1664 .pd1 = false,
1665 .pd2 = true,
1666 .psl = false,
1667},
1668.{
1669 .name = "no-line-commands",
1670 .syntax = .flag,
1671 .zig_equivalent = .other,
1672 .pd1 = false,
1673 .pd2 = true,
1674 .psl = false,
1675},
1676.{
1677 .name = "no-standard-includes",
1678 .syntax = .flag,
1679 .zig_equivalent = .other,
1680 .pd1 = false,
1681 .pd2 = true,
1682 .psl = false,
1683},
1684.{
1685 .name = "no-standard-libraries",
1686 .syntax = .flag,
1687 .zig_equivalent = .nostdlib,
1688 .pd1 = false,
1689 .pd2 = true,
1690 .psl = false,
1691},
1692.{
1693 .name = "no-undefined",
1694 .syntax = .flag,
1695 .zig_equivalent = .other,
1696 .pd1 = false,
1697 .pd2 = true,
1698 .psl = false,
1699},
1700.{
1701 .name = "no-warnings",
1702 .syntax = .flag,
1703 .zig_equivalent = .other,
1704 .pd1 = false,
1705 .pd2 = true,
1706 .psl = false,
1707},
1708.{
1709 .name = "optimize",
1710 .syntax = .flag,
1711 .zig_equivalent = .optimize,
1712 .pd1 = false,
1713 .pd2 = true,
1714 .psl = false,
1715},
1716.{
1717 .name = "output",
1718 .syntax = .separate,
1719 .zig_equivalent = .other,
1720 .pd1 = false,
1721 .pd2 = true,
1722 .psl = false,
1723},
1724.{
1725 .name = "output-class-directory",
1726 .syntax = .separate,
1727 .zig_equivalent = .other,
1728 .pd1 = false,
1729 .pd2 = true,
1730 .psl = false,
1731},
1732.{
1733 .name = "param",
1734 .syntax = .separate,
1735 .zig_equivalent = .other,
1736 .pd1 = false,
1737 .pd2 = true,
1738 .psl = false,
1739},
1740.{
1741 .name = "precompile",
1742 .syntax = .flag,
1743 .zig_equivalent = .other,
1744 .pd1 = false,
1745 .pd2 = true,
1746 .psl = false,
1747},
1748.{
1749 .name = "prefix",
1750 .syntax = .separate,
1751 .zig_equivalent = .other,
1752 .pd1 = false,
1753 .pd2 = true,
1754 .psl = false,
1755},
1756.{
1757 .name = "preprocess",
1758 .syntax = .flag,
1759 .zig_equivalent = .preprocess,
1760 .pd1 = false,
1761 .pd2 = true,
1762 .psl = false,
1763},
1764.{
1765 .name = "print-diagnostic-categories",
1766 .syntax = .flag,
1767 .zig_equivalent = .other,
1768 .pd1 = false,
1769 .pd2 = true,
1770 .psl = false,
1771},
1772.{
1773 .name = "print-file-name",
1774 .syntax = .separate,
1775 .zig_equivalent = .other,
1776 .pd1 = false,
1777 .pd2 = true,
1778 .psl = false,
1779},
1780.{
1781 .name = "print-missing-file-dependencies",
1782 .syntax = .flag,
1783 .zig_equivalent = .other,
1784 .pd1 = false,
1785 .pd2 = true,
1786 .psl = false,
1787},
1788.{
1789 .name = "print-prog-name",
1790 .syntax = .separate,
1791 .zig_equivalent = .other,
1792 .pd1 = false,
1793 .pd2 = true,
1794 .psl = false,
1795},
1796.{
1797 .name = "profile",
1798 .syntax = .flag,
1799 .zig_equivalent = .other,
1800 .pd1 = false,
1801 .pd2 = true,
1802 .psl = false,
1803},
1804.{
1805 .name = "profile-blocks",
1806 .syntax = .flag,
1807 .zig_equivalent = .other,
1808 .pd1 = false,
1809 .pd2 = true,
1810 .psl = false,
1811},
1812.{
1813 .name = "resource",
1814 .syntax = .separate,
1815 .zig_equivalent = .other,
1816 .pd1 = false,
1817 .pd2 = true,
1818 .psl = false,
1819},
1820.{
1821 .name = "rtlib",
1822 .syntax = .separate,
1823 .zig_equivalent = .other,
1824 .pd1 = false,
1825 .pd2 = true,
1826 .psl = false,
1827},
1828.{
1829 .name = "serialize-diagnostics",
1830 .syntax = .separate,
1831 .zig_equivalent = .other,
1832 .pd1 = true,
1833 .pd2 = true,
1834 .psl = false,
1835},
1836.{
1837 .name = "signed-char",
1838 .syntax = .flag,
1839 .zig_equivalent = .other,
1840 .pd1 = false,
1841 .pd2 = true,
1842 .psl = false,
1843},
1844.{
1845 .name = "std",
1846 .syntax = .separate,
1847 .zig_equivalent = .other,
1848 .pd1 = false,
1849 .pd2 = true,
1850 .psl = false,
1851},
1852.{
1853 .name = "stdlib",
1854 .syntax = .separate,
1855 .zig_equivalent = .other,
1856 .pd1 = false,
1857 .pd2 = true,
1858 .psl = false,
1859},
1860.{
1861 .name = "sysroot",
1862 .syntax = .separate,
1863 .zig_equivalent = .other,
1864 .pd1 = false,
1865 .pd2 = true,
1866 .psl = false,
1867},
1868.{
1869 .name = "target-help",
1870 .syntax = .flag,
1871 .zig_equivalent = .other,
1872 .pd1 = false,
1873 .pd2 = true,
1874 .psl = false,
1875},
1876.{
1877 .name = "trace-includes",
1878 .syntax = .flag,
1879 .zig_equivalent = .other,
1880 .pd1 = false,
1881 .pd2 = true,
1882 .psl = false,
1883},
1884.{
1885 .name = "undefine-macro",
1886 .syntax = .separate,
1887 .zig_equivalent = .other,
1888 .pd1 = false,
1889 .pd2 = true,
1890 .psl = false,
1891},
1892.{
1893 .name = "unsigned-char",
1894 .syntax = .flag,
1895 .zig_equivalent = .other,
1896 .pd1 = false,
1897 .pd2 = true,
1898 .psl = false,
1899},
1900.{
1901 .name = "user-dependencies",
1902 .syntax = .flag,
1903 .zig_equivalent = .other,
1904 .pd1 = false,
1905 .pd2 = true,
1906 .psl = false,
1907},
1908.{
1909 .name = "verbose",
1910 .syntax = .flag,
1911 .zig_equivalent = .other,
1912 .pd1 = false,
1913 .pd2 = true,
1914 .psl = false,
1915},
1916.{
1917 .name = "version",
1918 .syntax = .flag,
1919 .zig_equivalent = .other,
1920 .pd1 = false,
1921 .pd2 = true,
1922 .psl = false,
1923},
1924.{
1925 .name = "write-dependencies",
1926 .syntax = .flag,
1927 .zig_equivalent = .other,
1928 .pd1 = false,
1929 .pd2 = true,
1930 .psl = false,
1931},
1932.{
1933 .name = "write-user-dependencies",
1934 .syntax = .flag,
1935 .zig_equivalent = .other,
1936 .pd1 = false,
1937 .pd2 = true,
1938 .psl = false,
1939},
1940sepd1("add-plugin"),
1941flagpd1("faggressive-function-elimination"),
1942flagpd1("fno-aggressive-function-elimination"),
1943flagpd1("falign-commons"),
1944flagpd1("fno-align-commons"),
1945flagpd1("falign-jumps"),
1946flagpd1("fno-align-jumps"),
1947flagpd1("falign-labels"),
1948flagpd1("fno-align-labels"),
1949flagpd1("falign-loops"),
1950flagpd1("fno-align-loops"),
1951flagpd1("faligned-alloc-unavailable"),
1952flagpd1("all_load"),
1953flagpd1("fall-intrinsics"),
1954flagpd1("fno-all-intrinsics"),
1955sepd1("allowable_client"),
1956flagpd1("cfg-add-implicit-dtors"),
1957flagpd1("unoptimized-cfg"),
1958flagpd1("analyze"),
1959sepd1("analyze-function"),
1960sepd1("analyzer-checker"),
1961flagpd1("analyzer-checker-help"),
1962flagpd1("analyzer-checker-help-alpha"),
1963flagpd1("analyzer-checker-help-developer"),
1964flagpd1("analyzer-checker-option-help"),
1965flagpd1("analyzer-checker-option-help-alpha"),
1966flagpd1("analyzer-checker-option-help-developer"),
1967sepd1("analyzer-config"),
1968sepd1("analyzer-config-compatibility-mode"),
1969flagpd1("analyzer-config-help"),
1970sepd1("analyzer-constraints"),
1971flagpd1("analyzer-disable-all-checks"),
1972sepd1("analyzer-disable-checker"),
1973flagpd1("analyzer-disable-retry-exhausted"),
1974flagpd1("analyzer-display-progress"),
1975sepd1("analyzer-dump-egraph"),
1976sepd1("analyzer-inline-max-stack-depth"),
1977sepd1("analyzer-inlining-mode"),
1978flagpd1("analyzer-list-enabled-checkers"),
1979sepd1("analyzer-max-loop"),
1980flagpd1("analyzer-opt-analyze-headers"),
1981flagpd1("analyzer-opt-analyze-nested-blocks"),
1982sepd1("analyzer-output"),
1983sepd1("analyzer-purge"),
1984flagpd1("analyzer-stats"),
1985sepd1("analyzer-store"),
1986flagpd1("analyzer-viz-egraph-graphviz"),
1987flagpd1("analyzer-werror"),
1988flagpd1("fslp-vectorize-aggressive"),
1989flagpd1("fno-slp-vectorize-aggressive"),
1990flagpd1("fexpensive-optimizations"),
1991flagpd1("fno-expensive-optimizations"),
1992flagpd1("fdefer-pop"),
1993flagpd1("fno-defer-pop"),
1994flagpd1("fextended-identifiers"),
1995flagpd1("fno-extended-identifiers"),
1996flagpd1("fhonor-infinites"),
1997flagpd1("fno-honor-infinites"),
1998flagpd1("findirect-virtual-calls"),
1999sepd1("fnew-alignment"),
2000flagpd1("faligned-new"),
2001flagpd1("fno-aligned-new"),
2002flagpd1("fsched-interblock"),
2003flagpd1("ftree-vectorize"),
2004flagpd1("fno-tree-vectorize"),
2005flagpd1("ftree-slp-vectorize"),
2006flagpd1("fno-tree-slp-vectorize"),
2007flagpd1("fterminated-vtables"),
2008flagpd1("grecord-gcc-switches"),
2009flagpd1("gno-record-gcc-switches"),
2010flagpd1("fident"),
2011flagpd1("nocudalib"),
2012.{
2013 .name = "system-header-prefix",
2014 .syntax = .separate,
2015 .zig_equivalent = .other,
2016 .pd1 = false,
2017 .pd2 = true,
2018 .psl = false,
2019},
2020.{
2021 .name = "no-system-header-prefix",
2022 .syntax = .separate,
2023 .zig_equivalent = .other,
2024 .pd1 = false,
2025 .pd2 = true,
2026 .psl = false,
2027},
2028flagpd1("integrated-as"),
2029flagpd1("no-integrated-as"),
2030flagpd1("fkeep-inline-functions"),
2031flagpd1("fno-keep-inline-functions"),
2032flagpd1("fno-semantic-interposition"),
2033.{
2034 .name = "Gs",
2035 .syntax = .flag,
2036 .zig_equivalent = .other,
2037 .pd1 = true,
2038 .pd2 = false,
2039 .psl = true,
2040},
2041.{
2042 .name = "O1",
2043 .syntax = .flag,
2044 .zig_equivalent = .optimize,
2045 .pd1 = true,
2046 .pd2 = false,
2047 .psl = true,
2048},
2049.{
2050 .name = "O2",
2051 .syntax = .flag,
2052 .zig_equivalent = .optimize,
2053 .pd1 = true,
2054 .pd2 = false,
2055 .psl = true,
2056},
2057flagpd1("fno-ident"),
2058.{
2059 .name = "Ob0",
2060 .syntax = .flag,
2061 .zig_equivalent = .other,
2062 .pd1 = true,
2063 .pd2 = false,
2064 .psl = true,
2065},
2066.{
2067 .name = "Ob1",
2068 .syntax = .flag,
2069 .zig_equivalent = .other,
2070 .pd1 = true,
2071 .pd2 = false,
2072 .psl = true,
2073},
2074.{
2075 .name = "Ob2",
2076 .syntax = .flag,
2077 .zig_equivalent = .other,
2078 .pd1 = true,
2079 .pd2 = false,
2080 .psl = true,
2081},
2082.{
2083 .name = "Od",
2084 .syntax = .flag,
2085 .zig_equivalent = .other,
2086 .pd1 = true,
2087 .pd2 = false,
2088 .psl = true,
2089},
2090.{
2091 .name = "Og",
2092 .syntax = .flag,
2093 .zig_equivalent = .optimize,
2094 .pd1 = true,
2095 .pd2 = false,
2096 .psl = true,
2097},
2098.{
2099 .name = "Oi",
2100 .syntax = .flag,
2101 .zig_equivalent = .other,
2102 .pd1 = true,
2103 .pd2 = false,
2104 .psl = true,
2105},
2106.{
2107 .name = "Oi-",
2108 .syntax = .flag,
2109 .zig_equivalent = .other,
2110 .pd1 = true,
2111 .pd2 = false,
2112 .psl = true,
2113},
2114.{
2115 .name = "Os",
2116 .syntax = .flag,
2117 .zig_equivalent = .other,
2118 .pd1 = true,
2119 .pd2 = false,
2120 .psl = true,
2121},
2122.{
2123 .name = "Ot",
2124 .syntax = .flag,
2125 .zig_equivalent = .other,
2126 .pd1 = true,
2127 .pd2 = false,
2128 .psl = true,
2129},
2130.{
2131 .name = "Ox",
2132 .syntax = .flag,
2133 .zig_equivalent = .other,
2134 .pd1 = true,
2135 .pd2 = false,
2136 .psl = true,
2137},
2138flagpd1("fcuda-rdc"),
2139.{
2140 .name = "Oy",
2141 .syntax = .flag,
2142 .zig_equivalent = .other,
2143 .pd1 = true,
2144 .pd2 = false,
2145 .psl = true,
2146},
2147.{
2148 .name = "Oy-",
2149 .syntax = .flag,
2150 .zig_equivalent = .other,
2151 .pd1 = true,
2152 .pd2 = false,
2153 .psl = true,
2154},
2155flagpd1("fno-cuda-rdc"),
2156flagpd1("shared-libasan"),
2157flagpd1("frecord-gcc-switches"),
2158flagpd1("fno-record-gcc-switches"),
2159.{
2160 .name = "ansi",
2161 .syntax = .flag,
2162 .zig_equivalent = .other,
2163 .pd1 = true,
2164 .pd2 = true,
2165 .psl = false,
2166},
2167sepd1("arch"),
2168flagpd1("arch_errors_fatal"),
2169sepd1("arch_only"),
2170flagpd1("arcmt-check"),
2171flagpd1("arcmt-migrate"),
2172flagpd1("arcmt-migrate-emit-errors"),
2173sepd1("arcmt-migrate-report-output"),
2174flagpd1("arcmt-modify"),
2175flagpd1("ast-dump"),
2176flagpd1("ast-dump-all"),
2177sepd1("ast-dump-filter"),
2178flagpd1("ast-dump-lookups"),
2179flagpd1("ast-list"),
2180sepd1("ast-merge"),
2181flagpd1("ast-print"),
2182flagpd1("ast-view"),
2183flagpd1("fautomatic"),
2184flagpd1("fno-automatic"),
2185sepd1("aux-triple"),
2186flagpd1("fbackslash"),
2187flagpd1("fno-backslash"),
2188flagpd1("fbacktrace"),
2189flagpd1("fno-backtrace"),
2190flagpd1("bind_at_load"),
2191flagpd1("fbounds-check"),
2192flagpd1("fno-bounds-check"),
2193flagpd1("fbranch-count-reg"),
2194flagpd1("fno-branch-count-reg"),
2195flagpd1("building-pch-with-obj"),
2196flagpd1("bundle"),
2197sepd1("bundle_loader"),
2198.{
2199 .name = "c",
2200 .syntax = .flag,
2201 .zig_equivalent = .c,
2202 .pd1 = true,
2203 .pd2 = false,
2204 .psl = false,
2205},
2206flagpd1("fcaller-saves"),
2207flagpd1("fno-caller-saves"),
2208flagpd1("cc1"),
2209flagpd1("cc1as"),
2210flagpd1("ccc-arcmt-check"),
2211sepd1("ccc-arcmt-migrate"),
2212flagpd1("ccc-arcmt-modify"),
2213sepd1("ccc-gcc-name"),
2214sepd1("ccc-install-dir"),
2215sepd1("ccc-objcmt-migrate"),
2216flagpd1("ccc-print-bindings"),
2217flagpd1("ccc-print-phases"),
2218flagpd1("cfguard"),
2219flagpd1("cfguard-no-checks"),
2220sepd1("chain-include"),
2221flagpd1("fcheck-array-temporaries"),
2222flagpd1("fno-check-array-temporaries"),
2223flagpd1("cl-denorms-are-zero"),
2224flagpd1("cl-fast-relaxed-math"),
2225flagpd1("cl-finite-math-only"),
2226flagpd1("cl-fp32-correctly-rounded-divide-sqrt"),
2227flagpd1("cl-kernel-arg-info"),
2228flagpd1("cl-mad-enable"),
2229flagpd1("cl-no-signed-zeros"),
2230flagpd1("cl-opt-disable"),
2231flagpd1("cl-single-precision-constant"),
2232flagpd1("cl-strict-aliasing"),
2233flagpd1("cl-uniform-work-group-size"),
2234flagpd1("cl-unsafe-math-optimizations"),
2235sepd1("code-completion-at"),
2236flagpd1("code-completion-brief-comments"),
2237flagpd1("code-completion-macros"),
2238flagpd1("code-completion-patterns"),
2239flagpd1("code-completion-with-fixits"),
2240.{
2241 .name = "combine",
2242 .syntax = .flag,
2243 .zig_equivalent = .other,
2244 .pd1 = true,
2245 .pd2 = true,
2246 .psl = false,
2247},
2248flagpd1("compiler-options-dump"),
2249.{
2250 .name = "compress-debug-sections",
2251 .syntax = .flag,
2252 .zig_equivalent = .other,
2253 .pd1 = true,
2254 .pd2 = true,
2255 .psl = false,
2256},
2257.{
2258 .name = "config",
2259 .syntax = .separate,
2260 .zig_equivalent = .other,
2261 .pd1 = false,
2262 .pd2 = true,
2263 .psl = false,
2264},
2265.{
2266 .name = "coverage",
2267 .syntax = .flag,
2268 .zig_equivalent = .other,
2269 .pd1 = true,
2270 .pd2 = true,
2271 .psl = false,
2272},
2273flagpd1("coverage-cfg-checksum"),
2274sepd1("coverage-data-file"),
2275flagpd1("coverage-exit-block-before-body"),
2276flagpd1("coverage-no-function-names-in-data"),
2277sepd1("coverage-notes-file"),
2278flagpd1("cpp"),
2279flagpd1("cpp-precomp"),
2280flagpd1("fcray-pointer"),
2281flagpd1("fno-cray-pointer"),
2282.{
2283 .name = "cuda-compile-host-device",
2284 .syntax = .flag,
2285 .zig_equivalent = .other,
2286 .pd1 = false,
2287 .pd2 = true,
2288 .psl = false,
2289},
2290.{
2291 .name = "cuda-device-only",
2292 .syntax = .flag,
2293 .zig_equivalent = .other,
2294 .pd1 = false,
2295 .pd2 = true,
2296 .psl = false,
2297},
2298.{
2299 .name = "cuda-host-only",
2300 .syntax = .flag,
2301 .zig_equivalent = .other,
2302 .pd1 = false,
2303 .pd2 = true,
2304 .psl = false,
2305},
2306.{
2307 .name = "cuda-noopt-device-debug",
2308 .syntax = .flag,
2309 .zig_equivalent = .other,
2310 .pd1 = false,
2311 .pd2 = true,
2312 .psl = false,
2313},
2314.{
2315 .name = "cuda-path-ignore-env",
2316 .syntax = .flag,
2317 .zig_equivalent = .other,
2318 .pd1 = false,
2319 .pd2 = true,
2320 .psl = false,
2321},
2322flagpd1("dA"),
2323flagpd1("dD"),
2324flagpd1("dI"),
2325flagpd1("dM"),
2326flagpd1("d"),
2327flagpd1("fd-lines-as-code"),
2328flagpd1("fno-d-lines-as-code"),
2329flagpd1("fd-lines-as-comments"),
2330flagpd1("fno-d-lines-as-comments"),
2331flagpd1("dead_strip"),
2332flagpd1("debug-forward-template-params"),
2333flagpd1("debug-info-macro"),
2334flagpd1("fdefault-double-8"),
2335flagpd1("fno-default-double-8"),
2336sepd1("default-function-attr"),
2337flagpd1("fdefault-inline"),
2338flagpd1("fno-default-inline"),
2339flagpd1("fdefault-integer-8"),
2340flagpd1("fno-default-integer-8"),
2341flagpd1("fdefault-real-8"),
2342flagpd1("fno-default-real-8"),
2343sepd1("defsym"),
2344sepd1("dependency-dot"),
2345sepd1("dependency-file"),
2346flagpd1("detailed-preprocessing-record"),
2347flagpd1("fdevirtualize"),
2348flagpd1("fno-devirtualize"),
2349flagpd1("fdevirtualize-speculatively"),
2350flagpd1("fno-devirtualize-speculatively"),
2351sepd1("diagnostic-log-file"),
2352sepd1("serialize-diagnostic-file"),
2353flagpd1("disable-O0-optnone"),
2354flagpd1("disable-free"),
2355flagpd1("disable-lifetime-markers"),
2356flagpd1("disable-llvm-optzns"),
2357flagpd1("disable-llvm-passes"),
2358flagpd1("disable-llvm-verifier"),
2359flagpd1("disable-objc-default-synthesize-properties"),
2360flagpd1("disable-pragma-debug-crash"),
2361flagpd1("disable-red-zone"),
2362flagpd1("discard-value-names"),
2363flagpd1("fdollar-ok"),
2364flagpd1("fno-dollar-ok"),
2365flagpd1("dump-coverage-mapping"),
2366flagpd1("dump-deserialized-decls"),
2367flagpd1("fdump-fortran-optimized"),
2368flagpd1("fno-dump-fortran-optimized"),
2369flagpd1("fdump-fortran-original"),
2370flagpd1("fno-dump-fortran-original"),
2371flagpd1("fdump-parse-tree"),
2372flagpd1("fno-dump-parse-tree"),
2373flagpd1("dump-raw-tokens"),
2374flagpd1("dump-tokens"),
2375flagpd1("dumpmachine"),
2376flagpd1("dumpspecs"),
2377flagpd1("dumpversion"),
2378flagpd1("dwarf-column-info"),
2379sepd1("dwarf-debug-flags"),
2380sepd1("dwarf-debug-producer"),
2381flagpd1("dwarf-explicit-import"),
2382flagpd1("dwarf-ext-refs"),
2383sepd1("dylib_file"),
2384flagpd1("dylinker"),
2385flagpd1("dynamic"),
2386flagpd1("dynamiclib"),
2387flagpd1("feliminate-unused-debug-types"),
2388flagpd1("fno-eliminate-unused-debug-types"),
2389flagpd1("emit-ast"),
2390flagpd1("emit-codegen-only"),
2391flagpd1("emit-header-module"),
2392flagpd1("emit-html"),
2393flagpd1("emit-interface-stubs"),
2394flagpd1("emit-llvm"),
2395flagpd1("emit-llvm-bc"),
2396flagpd1("emit-llvm-only"),
2397flagpd1("emit-llvm-uselists"),
2398flagpd1("emit-merged-ifs"),
2399flagpd1("emit-module"),
2400flagpd1("emit-module-interface"),
2401flagpd1("emit-obj"),
2402flagpd1("emit-pch"),
2403flagpd1("enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang"),
2404sepd1("error-on-deserialized-decl"),
2405sepd1("exported_symbols_list"),
2406flagpd1("fexternal-blas"),
2407flagpd1("fno-external-blas"),
2408flagpd1("ff2c"),
2409flagpd1("fno-f2c"),
2410.{
2411 .name = "fPIC",
2412 .syntax = .flag,
2413 .zig_equivalent = .pic,
2414 .pd1 = true,
2415 .pd2 = false,
2416 .psl = false,
2417},
2418flagpd1("fPIE"),
2419flagpd1("faccess-control"),
2420flagpd1("faddrsig"),
2421flagpd1("falign-functions"),
2422flagpd1("faligned-allocation"),
2423flagpd1("fallow-editor-placeholders"),
2424flagpd1("fallow-half-arguments-and-returns"),
2425flagpd1("fallow-pch-with-compiler-errors"),
2426flagpd1("fallow-unsupported"),
2427flagpd1("faltivec"),
2428flagpd1("fansi-escape-codes"),
2429flagpd1("fapple-kext"),
2430flagpd1("fapple-link-rtlib"),
2431flagpd1("fapple-pragma-pack"),
2432flagpd1("fapplication-extension"),
2433flagpd1("fapply-global-visibility-to-externs"),
2434flagpd1("fasm"),
2435flagpd1("fasm-blocks"),
2436flagpd1("fassociative-math"),
2437flagpd1("fassume-sane-operator-new"),
2438flagpd1("fast"),
2439flagpd1("fastcp"),
2440flagpd1("fastf"),
2441flagpd1("fasynchronous-unwind-tables"),
2442flagpd1("ffat-lto-objects"),
2443flagpd1("fno-fat-lto-objects"),
2444flagpd1("fauto-profile"),
2445flagpd1("fauto-profile-accurate"),
2446flagpd1("fautolink"),
2447flagpd1("fblocks"),
2448flagpd1("fblocks-runtime-optional"),
2449flagpd1("fborland-extensions"),
2450sepd1("fbracket-depth"),
2451flagpd1("fbuiltin"),
2452flagpd1("fbuiltin-module-map"),
2453flagpd1("fcall-saved-x10"),
2454flagpd1("fcall-saved-x11"),
2455flagpd1("fcall-saved-x12"),
2456flagpd1("fcall-saved-x13"),
2457flagpd1("fcall-saved-x14"),
2458flagpd1("fcall-saved-x15"),
2459flagpd1("fcall-saved-x18"),
2460flagpd1("fcall-saved-x8"),
2461flagpd1("fcall-saved-x9"),
2462flagpd1("fcaret-diagnostics"),
2463sepd1("fcaret-diagnostics-max-lines"),
2464flagpd1("fcf-protection"),
2465flagpd1("fchar8_t"),
2466flagpd1("fcheck-new"),
2467flagpd1("fno-check-new"),
2468flagpd1("fcolor-diagnostics"),
2469flagpd1("fcommon"),
2470flagpd1("fcomplete-member-pointers"),
2471flagpd1("fconcepts-ts"),
2472flagpd1("fconst-strings"),
2473flagpd1("fconstant-cfstrings"),
2474sepd1("fconstant-string-class"),
2475sepd1("fconstexpr-backtrace-limit"),
2476sepd1("fconstexpr-depth"),
2477sepd1("fconstexpr-steps"),
2478flagpd1("fconvergent-functions"),
2479flagpd1("fcoroutines-ts"),
2480flagpd1("fcoverage-mapping"),
2481flagpd1("fcreate-profile"),
2482flagpd1("fcs-profile-generate"),
2483flagpd1("fcuda-allow-variadic-functions"),
2484flagpd1("fcuda-approx-transcendentals"),
2485flagpd1("fcuda-flush-denormals-to-zero"),
2486sepd1("fcuda-include-gpubinary"),
2487flagpd1("fcuda-is-device"),
2488flagpd1("fcuda-short-ptr"),
2489flagpd1("fcxx-exceptions"),
2490flagpd1("fcxx-modules"),
2491flagpd1("fc++-static-destructors"),
2492flagpd1("fdata-sections"),
2493sepd1("fdebug-compilation-dir"),
2494flagpd1("fdebug-info-for-profiling"),
2495flagpd1("fdebug-macro"),
2496flagpd1("fdebug-pass-arguments"),
2497flagpd1("fdebug-pass-manager"),
2498flagpd1("fdebug-pass-structure"),
2499flagpd1("fdebug-ranges-base-address"),
2500flagpd1("fdebug-types-section"),
2501flagpd1("fdebugger-cast-result-to-id"),
2502flagpd1("fdebugger-objc-literal"),
2503flagpd1("fdebugger-support"),
2504flagpd1("fdeclare-opencl-builtins"),
2505flagpd1("fdeclspec"),
2506flagpd1("fdelayed-template-parsing"),
2507flagpd1("fdelete-null-pointer-checks"),
2508flagpd1("fdeprecated-macro"),
2509flagpd1("fdiagnostics-absolute-paths"),
2510flagpd1("fdiagnostics-color"),
2511flagpd1("fdiagnostics-fixit-info"),
2512sepd1("fdiagnostics-format"),
2513flagpd1("fdiagnostics-parseable-fixits"),
2514flagpd1("fdiagnostics-print-source-range-info"),
2515sepd1("fdiagnostics-show-category"),
2516flagpd1("fdiagnostics-show-hotness"),
2517flagpd1("fdiagnostics-show-note-include-stack"),
2518flagpd1("fdiagnostics-show-option"),
2519flagpd1("fdiagnostics-show-template-tree"),
2520flagpd1("fdigraphs"),
2521flagpd1("fdisable-module-hash"),
2522flagpd1("fdiscard-value-names"),
2523flagpd1("fdollars-in-identifiers"),
2524flagpd1("fdouble-square-bracket-attributes"),
2525flagpd1("fdump-record-layouts"),
2526flagpd1("fdump-record-layouts-simple"),
2527flagpd1("fdump-vtable-layouts"),
2528flagpd1("fdwarf2-cfi-asm"),
2529flagpd1("fdwarf-directory-asm"),
2530flagpd1("fdwarf-exceptions"),
2531flagpd1("felide-constructors"),
2532flagpd1("feliminate-unused-debug-symbols"),
2533flagpd1("fembed-bitcode"),
2534flagpd1("fembed-bitcode-marker"),
2535flagpd1("femit-all-decls"),
2536flagpd1("femit-coverage-data"),
2537flagpd1("femit-coverage-notes"),
2538flagpd1("femit-debug-entry-values"),
2539flagpd1("femulated-tls"),
2540flagpd1("fencode-extended-block-signature"),
2541sepd1("ferror-limit"),
2542flagpd1("fescaping-block-tail-calls"),
2543flagpd1("fexceptions"),
2544flagpd1("fexperimental-isel"),
2545flagpd1("fexperimental-new-constant-interpreter"),
2546flagpd1("fexperimental-new-pass-manager"),
2547flagpd1("fexternc-nounwind"),
2548flagpd1("ffake-address-space-map"),
2549flagpd1("ffast-math"),
2550flagpd1("ffine-grained-bitfield-accesses"),
2551flagpd1("ffinite-math-only"),
2552flagpd1("ffixed-point"),
2553flagpd1("ffixed-r19"),
2554flagpd1("ffixed-r9"),
2555flagpd1("ffixed-x1"),
2556flagpd1("ffixed-x10"),
2557flagpd1("ffixed-x11"),
2558flagpd1("ffixed-x12"),
2559flagpd1("ffixed-x13"),
2560flagpd1("ffixed-x14"),
2561flagpd1("ffixed-x15"),
2562flagpd1("ffixed-x16"),
2563flagpd1("ffixed-x17"),
2564flagpd1("ffixed-x18"),
2565flagpd1("ffixed-x19"),
2566flagpd1("ffixed-x2"),
2567flagpd1("ffixed-x20"),
2568flagpd1("ffixed-x21"),
2569flagpd1("ffixed-x22"),
2570flagpd1("ffixed-x23"),
2571flagpd1("ffixed-x24"),
2572flagpd1("ffixed-x25"),
2573flagpd1("ffixed-x26"),
2574flagpd1("ffixed-x27"),
2575flagpd1("ffixed-x28"),
2576flagpd1("ffixed-x29"),
2577flagpd1("ffixed-x3"),
2578flagpd1("ffixed-x30"),
2579flagpd1("ffixed-x31"),
2580flagpd1("ffixed-x4"),
2581flagpd1("ffixed-x5"),
2582flagpd1("ffixed-x6"),
2583flagpd1("ffixed-x7"),
2584flagpd1("ffixed-x8"),
2585flagpd1("ffixed-x9"),
2586flagpd1("ffor-scope"),
2587flagpd1("fforbid-guard-variables"),
2588flagpd1("fforce-dwarf-frame"),
2589flagpd1("fforce-emit-vtables"),
2590flagpd1("fforce-enable-int128"),
2591flagpd1("ffreestanding"),
2592flagpd1("ffunction-sections"),
2593flagpd1("fgnu89-inline"),
2594flagpd1("fgnu-inline-asm"),
2595flagpd1("fgnu-keywords"),
2596flagpd1("fgnu-runtime"),
2597flagpd1("fgpu-allow-device-init"),
2598flagpd1("fgpu-rdc"),
2599flagpd1("fheinous-gnu-extensions"),
2600flagpd1("fhip-dump-offload-linker-script"),
2601flagpd1("fhip-new-launch-api"),
2602flagpd1("fhonor-infinities"),
2603flagpd1("fhonor-nans"),
2604flagpd1("fhosted"),
2605sepd1("filelist"),
2606sepd1("filetype"),
2607flagpd1("fimplicit-module-maps"),
2608flagpd1("fimplicit-modules"),
2609flagpd1("finclude-default-header"),
2610flagpd1("finline"),
2611flagpd1("finline-functions"),
2612flagpd1("finline-hint-functions"),
2613flagpd1("finline-limit"),
2614flagpd1("fno-inline-limit"),
2615flagpd1("finstrument-function-entry-bare"),
2616flagpd1("finstrument-functions"),
2617flagpd1("finstrument-functions-after-inlining"),
2618flagpd1("fintegrated-as"),
2619flagpd1("fintegrated-cc1"),
2620flagpd1("fix-only-warnings"),
2621flagpd1("fix-what-you-can"),
2622flagpd1("ffixed-form"),
2623flagpd1("fno-fixed-form"),
2624flagpd1("fixit"),
2625flagpd1("fixit-recompile"),
2626flagpd1("fixit-to-temporary"),
2627flagpd1("fjump-tables"),
2628flagpd1("fkeep-static-consts"),
2629flagpd1("flat_namespace"),
2630flagpd1("flax-vector-conversions"),
2631flagpd1("flimit-debug-info"),
2632flagpd1("ffloat-store"),
2633flagpd1("fno-float-store"),
2634flagpd1("flto"),
2635flagpd1("flto-unit"),
2636flagpd1("flto-visibility-public-std"),
2637sepd1("fmacro-backtrace-limit"),
2638flagpd1("fmath-errno"),
2639flagpd1("fmerge-all-constants"),
2640flagpd1("fmerge-functions"),
2641sepd1("fmessage-length"),
2642sepd1("fmodule-feature"),
2643flagpd1("fmodule-file-deps"),
2644sepd1("fmodule-implementation-of"),
2645flagpd1("fmodule-map-file-home-is-cwd"),
2646flagpd1("fmodule-maps"),
2647sepd1("fmodule-name"),
2648flagpd1("fmodules"),
2649flagpd1("fmodules-codegen"),
2650flagpd1("fmodules-debuginfo"),
2651flagpd1("fmodules-decluse"),
2652flagpd1("fmodules-disable-diagnostic-validation"),
2653flagpd1("fmodules-hash-content"),
2654flagpd1("fmodules-local-submodule-visibility"),
2655flagpd1("fmodules-search-all"),
2656flagpd1("fmodules-strict-context-hash"),
2657flagpd1("fmodules-strict-decluse"),
2658flagpd1("fmodules-ts"),
2659sepd1("fmodules-user-build-path"),
2660flagpd1("fmodules-validate-input-files-content"),
2661flagpd1("fmodules-validate-once-per-build-session"),
2662flagpd1("fmodules-validate-system-headers"),
2663flagpd1("fms-compatibility"),
2664flagpd1("fms-extensions"),
2665flagpd1("fms-volatile"),
2666flagpd1("fmudflap"),
2667flagpd1("fmudflapth"),
2668flagpd1("fnative-half-arguments-and-returns"),
2669flagpd1("fnative-half-type"),
2670flagpd1("fnested-functions"),
2671flagpd1("fnext-runtime"),
2672.{
2673 .name = "fno-PIC",
2674 .syntax = .flag,
2675 .zig_equivalent = .no_pic,
2676 .pd1 = true,
2677 .pd2 = false,
2678 .psl = false,
2679},
2680flagpd1("fno-PIE"),
2681flagpd1("fno-access-control"),
2682flagpd1("fno-addrsig"),
2683flagpd1("fno-align-functions"),
2684flagpd1("fno-aligned-allocation"),
2685flagpd1("fno-allow-editor-placeholders"),
2686flagpd1("fno-altivec"),
2687flagpd1("fno-apple-pragma-pack"),
2688flagpd1("fno-application-extension"),
2689flagpd1("fno-asm"),
2690flagpd1("fno-asm-blocks"),
2691flagpd1("fno-associative-math"),
2692flagpd1("fno-assume-sane-operator-new"),
2693flagpd1("fno-asynchronous-unwind-tables"),
2694flagpd1("fno-auto-profile"),
2695flagpd1("fno-auto-profile-accurate"),
2696flagpd1("fno-autolink"),
2697flagpd1("fno-bitfield-type-align"),
2698flagpd1("fno-blocks"),
2699flagpd1("fno-borland-extensions"),
2700flagpd1("fno-builtin"),
2701flagpd1("fno-caret-diagnostics"),
2702flagpd1("fno-char8_t"),
2703flagpd1("fno-color-diagnostics"),
2704flagpd1("fno-common"),
2705flagpd1("fno-complete-member-pointers"),
2706flagpd1("fno-concept-satisfaction-caching"),
2707flagpd1("fno-const-strings"),
2708flagpd1("fno-constant-cfstrings"),
2709flagpd1("fno-coroutines-ts"),
2710flagpd1("fno-coverage-mapping"),
2711flagpd1("fno-crash-diagnostics"),
2712flagpd1("fno-cuda-approx-transcendentals"),
2713flagpd1("fno-cuda-flush-denormals-to-zero"),
2714flagpd1("fno-cuda-host-device-constexpr"),
2715flagpd1("fno-cuda-short-ptr"),
2716flagpd1("fno-cxx-exceptions"),
2717flagpd1("fno-cxx-modules"),
2718flagpd1("fno-c++-static-destructors"),
2719flagpd1("fno-data-sections"),
2720flagpd1("fno-debug-info-for-profiling"),
2721flagpd1("fno-debug-macro"),
2722flagpd1("fno-debug-pass-manager"),
2723flagpd1("fno-debug-ranges-base-address"),
2724flagpd1("fno-debug-types-section"),
2725flagpd1("fno-declspec"),
2726flagpd1("fno-delayed-template-parsing"),
2727flagpd1("fno-delete-null-pointer-checks"),
2728flagpd1("fno-deprecated-macro"),
2729flagpd1("fno-diagnostics-color"),
2730flagpd1("fno-diagnostics-fixit-info"),
2731flagpd1("fno-diagnostics-show-hotness"),
2732flagpd1("fno-diagnostics-show-note-include-stack"),
2733flagpd1("fno-diagnostics-show-option"),
2734flagpd1("fno-diagnostics-use-presumed-location"),
2735flagpd1("fno-digraphs"),
2736flagpd1("fno-discard-value-names"),
2737flagpd1("fno-dllexport-inlines"),
2738flagpd1("fno-dollars-in-identifiers"),
2739flagpd1("fno-double-square-bracket-attributes"),
2740flagpd1("fno-dwarf2-cfi-asm"),
2741flagpd1("fno-dwarf-directory-asm"),
2742flagpd1("fno-elide-constructors"),
2743flagpd1("fno-elide-type"),
2744flagpd1("fno-eliminate-unused-debug-symbols"),
2745flagpd1("fno-emulated-tls"),
2746flagpd1("fno-escaping-block-tail-calls"),
2747flagpd1("fno-exceptions"),
2748flagpd1("fno-experimental-isel"),
2749flagpd1("fno-experimental-new-pass-manager"),
2750flagpd1("fno-fast-math"),
2751flagpd1("fno-fine-grained-bitfield-accesses"),
2752flagpd1("fno-finite-math-only"),
2753flagpd1("fno-fixed-point"),
2754flagpd1("fno-for-scope"),
2755flagpd1("fno-force-dwarf-frame"),
2756flagpd1("fno-force-emit-vtables"),
2757flagpd1("fno-force-enable-int128"),
2758flagpd1("fno-function-sections"),
2759flagpd1("fno-gnu89-inline"),
2760flagpd1("fno-gnu-inline-asm"),
2761flagpd1("fno-gnu-keywords"),
2762flagpd1("fno-gpu-allow-device-init"),
2763flagpd1("fno-gpu-rdc"),
2764flagpd1("fno-hip-new-launch-api"),
2765flagpd1("fno-honor-infinities"),
2766flagpd1("fno-honor-nans"),
2767flagpd1("fno-implicit-module-maps"),
2768flagpd1("fno-implicit-modules"),
2769flagpd1("fno-inline"),
2770flagpd1("fno-inline-functions"),
2771flagpd1("fno-integrated-as"),
2772flagpd1("fno-integrated-cc1"),
2773flagpd1("fno-jump-tables"),
2774flagpd1("fno-lax-vector-conversions"),
2775flagpd1("fno-limit-debug-info"),
2776flagpd1("fno-lto"),
2777flagpd1("fno-lto-unit"),
2778flagpd1("fno-math-builtin"),
2779flagpd1("fno-math-errno"),
2780flagpd1("fno-max-type-align"),
2781flagpd1("fno-merge-all-constants"),
2782flagpd1("fno-module-file-deps"),
2783flagpd1("fno-module-maps"),
2784flagpd1("fno-modules"),
2785flagpd1("fno-modules-decluse"),
2786flagpd1("fno-modules-error-recovery"),
2787flagpd1("fno-modules-global-index"),
2788flagpd1("fno-modules-search-all"),
2789flagpd1("fno-strict-modules-decluse"),
2790flagpd1("fno_modules-validate-input-files-content"),
2791flagpd1("fno-modules-validate-system-headers"),
2792flagpd1("fno-ms-compatibility"),
2793flagpd1("fno-ms-extensions"),
2794flagpd1("fno-objc-arc"),
2795flagpd1("fno-objc-arc-exceptions"),
2796flagpd1("fno-objc-convert-messages-to-runtime-calls"),
2797flagpd1("fno-objc-exceptions"),
2798flagpd1("fno-objc-infer-related-result-type"),
2799flagpd1("fno-objc-legacy-dispatch"),
2800flagpd1("fno-objc-nonfragile-abi"),
2801flagpd1("fno-objc-weak"),
2802flagpd1("fno-omit-frame-pointer"),
2803flagpd1("fno-openmp"),
2804flagpd1("fno-openmp-cuda-force-full-runtime"),
2805flagpd1("fno-openmp-cuda-mode"),
2806flagpd1("fno-openmp-optimistic-collapse"),
2807flagpd1("fno-openmp-simd"),
2808flagpd1("fno-operator-names"),
2809flagpd1("fno-optimize-sibling-calls"),
2810flagpd1("fno-pack-struct"),
2811flagpd1("fno-padding-on-unsigned-fixed-point"),
2812flagpd1("fno-pascal-strings"),
2813flagpd1("fno-pch-timestamp"),
2814flagpd1("fno_pch-validate-input-files-content"),
2815flagpd1("fno-pic"),
2816flagpd1("fno-pie"),
2817flagpd1("fno-plt"),
2818flagpd1("fno-preserve-as-comments"),
2819flagpd1("fno-profile-arcs"),
2820flagpd1("fno-profile-generate"),
2821flagpd1("fno-profile-instr-generate"),
2822flagpd1("fno-profile-instr-use"),
2823flagpd1("fno-profile-sample-accurate"),
2824flagpd1("fno-profile-sample-use"),
2825flagpd1("fno-profile-use"),
2826flagpd1("fno-reciprocal-math"),
2827flagpd1("fno-record-command-line"),
2828flagpd1("fno-register-global-dtors-with-atexit"),
2829flagpd1("fno-relaxed-template-template-args"),
2830flagpd1("fno-reroll-loops"),
2831flagpd1("fno-rewrite-imports"),
2832flagpd1("fno-rewrite-includes"),
2833flagpd1("fno-ropi"),
2834flagpd1("fno-rounding-math"),
2835flagpd1("fno-rtlib-add-rpath"),
2836flagpd1("fno-rtti"),
2837flagpd1("fno-rtti-data"),
2838flagpd1("fno-rwpi"),
2839flagpd1("fno-sanitize-address-poison-custom-array-cookie"),
2840flagpd1("fno-sanitize-address-use-after-scope"),
2841flagpd1("fno-sanitize-address-use-odr-indicator"),
2842flagpd1("fno-sanitize-blacklist"),
2843flagpd1("fno-sanitize-cfi-canonical-jump-tables"),
2844flagpd1("fno-sanitize-cfi-cross-dso"),
2845flagpd1("fno-sanitize-link-c++-runtime"),
2846flagpd1("fno-sanitize-link-runtime"),
2847flagpd1("fno-sanitize-memory-track-origins"),
2848flagpd1("fno-sanitize-memory-use-after-dtor"),
2849flagpd1("fno-sanitize-minimal-runtime"),
2850flagpd1("fno-sanitize-recover"),
2851flagpd1("fno-sanitize-stats"),
2852flagpd1("fno-sanitize-thread-atomics"),
2853flagpd1("fno-sanitize-thread-func-entry-exit"),
2854flagpd1("fno-sanitize-thread-memory-access"),
2855flagpd1("fno-sanitize-undefined-trap-on-error"),
2856flagpd1("fno-save-optimization-record"),
2857flagpd1("fno-short-enums"),
2858flagpd1("fno-short-wchar"),
2859flagpd1("fno-show-column"),
2860flagpd1("fno-show-source-location"),
2861flagpd1("fno-signaling-math"),
2862flagpd1("fno-signed-char"),
2863flagpd1("fno-signed-wchar"),
2864flagpd1("fno-signed-zeros"),
2865flagpd1("fno-sized-deallocation"),
2866flagpd1("fno-slp-vectorize"),
2867flagpd1("fno-spell-checking"),
2868flagpd1("fno-split-dwarf-inlining"),
2869flagpd1("fno-split-lto-unit"),
2870flagpd1("fno-stack-protector"),
2871flagpd1("fno-stack-size-section"),
2872flagpd1("fno-standalone-debug"),
2873flagpd1("fno-strict-aliasing"),
2874flagpd1("fno-strict-enums"),
2875flagpd1("fno-strict-float-cast-overflow"),
2876flagpd1("fno-strict-overflow"),
2877flagpd1("fno-strict-return"),
2878flagpd1("fno-strict-vtable-pointers"),
2879flagpd1("fno-struct-path-tbaa"),
2880flagpd1("fno-temp-file"),
2881flagpd1("fno-threadsafe-statics"),
2882flagpd1("fno-trapping-math"),
2883flagpd1("fno-trigraphs"),
2884flagpd1("fno-unique-section-names"),
2885flagpd1("fno-unit-at-a-time"),
2886flagpd1("fno-unroll-loops"),
2887flagpd1("fno-unsafe-math-optimizations"),
2888flagpd1("fno-unsigned-char"),
2889flagpd1("fno-unwind-tables"),
2890flagpd1("fno-use-cxa-atexit"),
2891flagpd1("fno-use-init-array"),
2892flagpd1("fno-use-line-directives"),
2893flagpd1("fno-validate-pch"),
2894flagpd1("fno-var-tracking"),
2895flagpd1("fno-vectorize"),
2896flagpd1("fno-verbose-asm"),
2897flagpd1("fno-virtual-function_elimination"),
2898flagpd1("fno-wchar"),
2899flagpd1("fno-whole-program-vtables"),
2900flagpd1("fno-working-directory"),
2901flagpd1("fno-wrapv"),
2902flagpd1("fno-zero-initialized-in-bss"),
2903flagpd1("fno-zvector"),
2904flagpd1("fnoopenmp-relocatable-target"),
2905flagpd1("fnoopenmp-use-tls"),
2906flagpd1("fno-xray-always-emit-customevents"),
2907flagpd1("fno-xray-always-emit-typedevents"),
2908flagpd1("fno-xray-instrument"),
2909flagpd1("fnoxray-link-deps"),
2910flagpd1("fobjc-arc"),
2911flagpd1("fobjc-arc-exceptions"),
2912flagpd1("fobjc-atdefs"),
2913flagpd1("fobjc-call-cxx-cdtors"),
2914flagpd1("fobjc-convert-messages-to-runtime-calls"),
2915flagpd1("fobjc-exceptions"),
2916flagpd1("fobjc-gc"),
2917flagpd1("fobjc-gc-only"),
2918flagpd1("fobjc-infer-related-result-type"),
2919flagpd1("fobjc-legacy-dispatch"),
2920flagpd1("fobjc-link-runtime"),
2921flagpd1("fobjc-new-property"),
2922flagpd1("fobjc-nonfragile-abi"),
2923flagpd1("fobjc-runtime-has-weak"),
2924flagpd1("fobjc-sender-dependent-dispatch"),
2925flagpd1("fobjc-subscripting-legacy-runtime"),
2926flagpd1("fobjc-weak"),
2927flagpd1("fomit-frame-pointer"),
2928flagpd1("fopenmp"),
2929flagpd1("fopenmp-cuda-force-full-runtime"),
2930flagpd1("fopenmp-cuda-mode"),
2931flagpd1("fopenmp-enable-irbuilder"),
2932sepd1("fopenmp-host-ir-file-path"),
2933flagpd1("fopenmp-is-device"),
2934flagpd1("fopenmp-optimistic-collapse"),
2935flagpd1("fopenmp-relocatable-target"),
2936flagpd1("fopenmp-simd"),
2937flagpd1("fopenmp-use-tls"),
2938sepd1("foperator-arrow-depth"),
2939flagpd1("foptimize-sibling-calls"),
2940flagpd1("force_cpusubtype_ALL"),
2941flagpd1("force_flat_namespace"),
2942sepd1("force_load"),
2943flagpd1("forder-file-instrumentation"),
2944flagpd1("fpack-struct"),
2945flagpd1("fpadding-on-unsigned-fixed-point"),
2946flagpd1("fparse-all-comments"),
2947flagpd1("fpascal-strings"),
2948flagpd1("fpcc-struct-return"),
2949flagpd1("fpch-preprocess"),
2950flagpd1("fpch-validate-input-files-content"),
2951flagpd1("fpic"),
2952flagpd1("fpie"),
2953flagpd1("fplt"),
2954flagpd1("fpreserve-as-comments"),
2955flagpd1("fpreserve-vec3-type"),
2956flagpd1("fprofile-arcs"),
2957flagpd1("fprofile-generate"),
2958flagpd1("fprofile-instr-generate"),
2959flagpd1("fprofile-instr-use"),
2960sepd1("fprofile-remapping-file"),
2961flagpd1("fprofile-sample-accurate"),
2962flagpd1("fprofile-sample-use"),
2963flagpd1("fprofile-use"),
2964sepd1("framework"),
2965flagpd1("freciprocal-math"),
2966flagpd1("frecord-command-line"),
2967flagpd1("ffree-form"),
2968flagpd1("fno-free-form"),
2969flagpd1("freg-struct-return"),
2970flagpd1("fregister-global-dtors-with-atexit"),
2971flagpd1("frelaxed-template-template-args"),
2972flagpd1("freroll-loops"),
2973flagpd1("fretain-comments-from-system-headers"),
2974flagpd1("frewrite-imports"),
2975flagpd1("frewrite-includes"),
2976sepd1("frewrite-map-file"),
2977flagpd1("ffriend-injection"),
2978flagpd1("fno-friend-injection"),
2979flagpd1("ffrontend-optimize"),
2980flagpd1("fno-frontend-optimize"),
2981flagpd1("fropi"),
2982flagpd1("frounding-math"),
2983flagpd1("frtlib-add-rpath"),
2984flagpd1("frtti"),
2985flagpd1("frwpi"),
2986flagpd1("fsanitize-address-globals-dead-stripping"),
2987flagpd1("fsanitize-address-poison-custom-array-cookie"),
2988flagpd1("fsanitize-address-use-after-scope"),
2989flagpd1("fsanitize-address-use-odr-indicator"),
2990flagpd1("fsanitize-cfi-canonical-jump-tables"),
2991flagpd1("fsanitize-cfi-cross-dso"),
2992flagpd1("fsanitize-cfi-icall-generalize-pointers"),
2993flagpd1("fsanitize-coverage-8bit-counters"),
2994flagpd1("fsanitize-coverage-indirect-calls"),
2995flagpd1("fsanitize-coverage-inline-8bit-counters"),
2996flagpd1("fsanitize-coverage-no-prune"),
2997flagpd1("fsanitize-coverage-pc-table"),
2998flagpd1("fsanitize-coverage-stack-depth"),
2999flagpd1("fsanitize-coverage-trace-bb"),
3000flagpd1("fsanitize-coverage-trace-cmp"),
3001flagpd1("fsanitize-coverage-trace-div"),
3002flagpd1("fsanitize-coverage-trace-gep"),
3003flagpd1("fsanitize-coverage-trace-pc"),
3004flagpd1("fsanitize-coverage-trace-pc-guard"),
3005flagpd1("fsanitize-link-c++-runtime"),
3006flagpd1("fsanitize-link-runtime"),
3007flagpd1("fsanitize-memory-track-origins"),
3008flagpd1("fsanitize-memory-use-after-dtor"),
3009flagpd1("fsanitize-minimal-runtime"),
3010flagpd1("fsanitize-recover"),
3011flagpd1("fsanitize-stats"),
3012flagpd1("fsanitize-thread-atomics"),
3013flagpd1("fsanitize-thread-func-entry-exit"),
3014flagpd1("fsanitize-thread-memory-access"),
3015flagpd1("fsanitize-undefined-trap-on-error"),
3016flagpd1("fsave-optimization-record"),
3017flagpd1("fseh-exceptions"),
3018flagpd1("fshort-enums"),
3019flagpd1("fshort-wchar"),
3020flagpd1("fshow-column"),
3021flagpd1("fshow-source-location"),
3022flagpd1("fsignaling-math"),
3023flagpd1("fsigned-bitfields"),
3024flagpd1("fsigned-char"),
3025flagpd1("fsigned-wchar"),
3026flagpd1("fsigned-zeros"),
3027flagpd1("fsized-deallocation"),
3028flagpd1("fsjlj-exceptions"),
3029flagpd1("fslp-vectorize"),
3030flagpd1("fspell-checking"),
3031sepd1("fspell-checking-limit"),
3032flagpd1("fsplit-dwarf-inlining"),
3033flagpd1("fsplit-lto-unit"),
3034flagpd1("fsplit-stack"),
3035flagpd1("fstack-protector"),
3036flagpd1("fstack-protector-all"),
3037flagpd1("fstack-protector-strong"),
3038flagpd1("fstack-size-section"),
3039flagpd1("fstandalone-debug"),
3040flagpd1("fstrict-aliasing"),
3041flagpd1("fstrict-enums"),
3042flagpd1("fstrict-float-cast-overflow"),
3043flagpd1("fstrict-overflow"),
3044flagpd1("fstrict-return"),
3045flagpd1("fstrict-vtable-pointers"),
3046flagpd1("fstruct-path-tbaa"),
3047flagpd1("fsycl-is-device"),
3048flagpd1("fsyntax-only"),
3049sepd1("ftabstop"),
3050sepd1("ftemplate-backtrace-limit"),
3051sepd1("ftemplate-depth"),
3052flagpd1("ftest-coverage"),
3053flagpd1("fthreadsafe-statics"),
3054flagpd1("ftime-report"),
3055flagpd1("ftime-trace"),
3056flagpd1("ftrapping-math"),
3057flagpd1("ftrapv"),
3058sepd1("ftrapv-handler"),
3059flagpd1("ftrigraphs"),
3060sepd1("ftype-visibility"),
3061sepd1("function-alignment"),
3062flagpd1("ffunction-attribute-list"),
3063flagpd1("fno-function-attribute-list"),
3064flagpd1("funique-section-names"),
3065flagpd1("funit-at-a-time"),
3066flagpd1("funknown-anytype"),
3067flagpd1("funroll-loops"),
3068flagpd1("funsafe-math-optimizations"),
3069flagpd1("funsigned-bitfields"),
3070flagpd1("funsigned-char"),
3071flagpd1("funwind-tables"),
3072flagpd1("fuse-cxa-atexit"),
3073flagpd1("fuse-init-array"),
3074flagpd1("fuse-line-directives"),
3075flagpd1("fuse-register-sized-bitfield-access"),
3076flagpd1("fvalidate-ast-input-files-content"),
3077flagpd1("fvectorize"),
3078flagpd1("fverbose-asm"),
3079flagpd1("fvirtual-function-elimination"),
3080sepd1("fvisibility"),
3081flagpd1("fvisibility-global-new-delete-hidden"),
3082flagpd1("fvisibility-inlines-hidden"),
3083flagpd1("fvisibility-ms-compat"),
3084flagpd1("fwasm-exceptions"),
3085flagpd1("fwhole-program-vtables"),
3086flagpd1("fwrapv"),
3087flagpd1("fwritable-strings"),
3088flagpd1("fxray-always-emit-customevents"),
3089flagpd1("fxray-always-emit-typedevents"),
3090flagpd1("fxray-instrument"),
3091flagpd1("fxray-link-deps"),
3092flagpd1("fzero-initialized-in-bss"),
3093flagpd1("fzvector"),
3094flagpd1("g0"),
3095flagpd1("g1"),
3096flagpd1("g2"),
3097flagpd1("g3"),
3098.{
3099 .name = "g",
3100 .syntax = .flag,
3101 .zig_equivalent = .debug,
3102 .pd1 = true,
3103 .pd2 = false,
3104 .psl = false,
3105},
3106sepd1("gcc-toolchain"),
3107flagpd1("gcodeview"),
3108flagpd1("gcodeview-ghash"),
3109flagpd1("gcolumn-info"),
3110flagpd1("fgcse-after-reload"),
3111flagpd1("fno-gcse-after-reload"),
3112flagpd1("fgcse"),
3113flagpd1("fno-gcse"),
3114flagpd1("fgcse-las"),
3115flagpd1("fno-gcse-las"),
3116flagpd1("fgcse-sm"),
3117flagpd1("fno-gcse-sm"),
3118flagpd1("gdwarf"),
3119flagpd1("gdwarf-2"),
3120flagpd1("gdwarf-3"),
3121flagpd1("gdwarf-4"),
3122flagpd1("gdwarf-5"),
3123flagpd1("gdwarf-aranges"),
3124flagpd1("gembed-source"),
3125sepd1("gen-cdb-fragment-path"),
3126flagpd1("gen-reproducer"),
3127flagpd1("gfull"),
3128flagpd1("ggdb"),
3129flagpd1("ggdb0"),
3130flagpd1("ggdb1"),
3131flagpd1("ggdb2"),
3132flagpd1("ggdb3"),
3133flagpd1("ggnu-pubnames"),
3134flagpd1("ginline-line-tables"),
3135flagpd1("gline-directives-only"),
3136flagpd1("gline-tables-only"),
3137flagpd1("glldb"),
3138flagpd1("gmlt"),
3139flagpd1("gmodules"),
3140flagpd1("gno-codeview-ghash"),
3141flagpd1("gno-column-info"),
3142flagpd1("gno-embed-source"),
3143flagpd1("gno-gnu-pubnames"),
3144flagpd1("gno-inline-line-tables"),
3145flagpd1("gno-pubnames"),
3146flagpd1("gno-record-command-line"),
3147flagpd1("gno-strict-dwarf"),
3148flagpd1("fgnu"),
3149flagpd1("fno-gnu"),
3150flagpd1("gpubnames"),
3151flagpd1("grecord-command-line"),
3152flagpd1("gsce"),
3153flagpd1("gsplit-dwarf"),
3154flagpd1("gstrict-dwarf"),
3155flagpd1("gtoggle"),
3156flagpd1("gused"),
3157flagpd1("gz"),
3158sepd1("header-include-file"),
3159.{
3160 .name = "help",
3161 .syntax = .flag,
3162 .zig_equivalent = .driver_punt,
3163 .pd1 = true,
3164 .pd2 = true,
3165 .psl = false,
3166},
3167.{
3168 .name = "hip-link",
3169 .syntax = .flag,
3170 .zig_equivalent = .other,
3171 .pd1 = false,
3172 .pd2 = true,
3173 .psl = false,
3174},
3175sepd1("image_base"),
3176flagpd1("fimplement-inlines"),
3177flagpd1("fno-implement-inlines"),
3178flagpd1("fimplicit-none"),
3179flagpd1("fno-implicit-none"),
3180flagpd1("fimplicit-templates"),
3181flagpd1("fno-implicit-templates"),
3182sepd1("imultilib"),
3183sepd1("include-pch"),
3184flagpd1("index-header-map"),
3185sepd1("init"),
3186flagpd1("finit-local-zero"),
3187flagpd1("fno-init-local-zero"),
3188flagpd1("init-only"),
3189flagpd1("finline-functions-called-once"),
3190flagpd1("fno-inline-functions-called-once"),
3191flagpd1("finline-small-functions"),
3192flagpd1("fno-inline-small-functions"),
3193sepd1("install_name"),
3194flagpd1("finteger-4-integer-8"),
3195flagpd1("fno-integer-4-integer-8"),
3196flagpd1("fintrinsic-modules-path"),
3197flagpd1("fno-intrinsic-modules-path"),
3198flagpd1("fipa-cp"),
3199flagpd1("fno-ipa-cp"),
3200flagpd1("fivopts"),
3201flagpd1("fno-ivopts"),
3202flagpd1("keep_private_externs"),
3203sepd1("lazy_framework"),
3204sepd1("lazy_library"),
3205sepd1("load"),
3206flagpd1("m16"),
3207flagpd1("m32"),
3208flagpd1("m3dnow"),
3209flagpd1("m3dnowa"),
3210flagpd1("m64"),
3211flagpd1("m80387"),
3212flagpd1("mabi=ieeelongdouble"),
3213flagpd1("mabicalls"),
3214flagpd1("madx"),
3215flagpd1("maes"),
3216sepd1("main-file-name"),
3217flagpd1("malign-double"),
3218flagpd1("maltivec"),
3219flagpd1("marm"),
3220flagpd1("masm-verbose"),
3221flagpd1("massembler-fatal-warnings"),
3222flagpd1("massembler-no-warn"),
3223flagpd1("matomics"),
3224flagpd1("mavx"),
3225flagpd1("mavx2"),
3226flagpd1("mavx512bf16"),
3227flagpd1("mavx512bitalg"),
3228flagpd1("mavx512bw"),
3229flagpd1("mavx512cd"),
3230flagpd1("mavx512dq"),
3231flagpd1("mavx512er"),
3232flagpd1("mavx512f"),
3233flagpd1("mavx512ifma"),
3234flagpd1("mavx512pf"),
3235flagpd1("mavx512vbmi"),
3236flagpd1("mavx512vbmi2"),
3237flagpd1("mavx512vl"),
3238flagpd1("mavx512vnni"),
3239flagpd1("mavx512vp2intersect"),
3240flagpd1("mavx512vpopcntdq"),
3241flagpd1("fmax-identifier-length"),
3242flagpd1("fno-max-identifier-length"),
3243flagpd1("mbackchain"),
3244flagpd1("mbig-endian"),
3245flagpd1("mbmi"),
3246flagpd1("mbmi2"),
3247flagpd1("mbranch-likely"),
3248flagpd1("mbranch-target-enforce"),
3249flagpd1("mbranches-within-32B-boundaries"),
3250flagpd1("mbulk-memory"),
3251flagpd1("mcheck-zero-division"),
3252flagpd1("mcldemote"),
3253flagpd1("mclflushopt"),
3254flagpd1("mclwb"),
3255flagpd1("mclzero"),
3256flagpd1("mcmodel=medany"),
3257flagpd1("mcmodel=medlow"),
3258flagpd1("mcmpb"),
3259flagpd1("mcmse"),
3260sepd1("mcode-model"),
3261flagpd1("mcode-object-v3"),
3262flagpd1("mconstant-cfstrings"),
3263flagpd1("mconstructor-aliases"),
3264flagpd1("mcpu=?"),
3265flagpd1("mcrbits"),
3266flagpd1("mcrc"),
3267flagpd1("mcumode"),
3268flagpd1("mcx16"),
3269sepd1("mdebug-pass"),
3270flagpd1("mdirect-move"),
3271flagpd1("mdisable-tail-calls"),
3272flagpd1("mdouble-float"),
3273flagpd1("mdsp"),
3274flagpd1("mdspr2"),
3275sepd1("meabi"),
3276flagpd1("membedded-data"),
3277flagpd1("menable-no-infs"),
3278flagpd1("menable-no-nans"),
3279flagpd1("menable-unsafe-fp-math"),
3280flagpd1("menqcmd"),
3281flagpd1("fmerge-constants"),
3282flagpd1("fno-merge-constants"),
3283flagpd1("mexception-handling"),
3284flagpd1("mexecute-only"),
3285flagpd1("mextern-sdata"),
3286flagpd1("mf16c"),
3287flagpd1("mfancy-math-387"),
3288flagpd1("mfentry"),
3289flagpd1("mfix-and-continue"),
3290flagpd1("mfix-cortex-a53-835769"),
3291flagpd1("mfloat128"),
3292sepd1("mfloat-abi"),
3293flagpd1("mfma"),
3294flagpd1("mfma4"),
3295flagpd1("mfp32"),
3296flagpd1("mfp64"),
3297sepd1("mfpmath"),
3298flagpd1("mfprnd"),
3299flagpd1("mfpxx"),
3300flagpd1("mfsgsbase"),
3301flagpd1("mfxsr"),
3302flagpd1("mgeneral-regs-only"),
3303flagpd1("mgfni"),
3304flagpd1("mginv"),
3305flagpd1("mglibc"),
3306flagpd1("mglobal-merge"),
3307flagpd1("mgpopt"),
3308flagpd1("mhard-float"),
3309flagpd1("mhvx"),
3310flagpd1("mhtm"),
3311flagpd1("miamcu"),
3312flagpd1("mieee-fp"),
3313flagpd1("mieee-rnd-near"),
3314flagpd1("migrate"),
3315flagpd1("no-finalize-removal"),
3316flagpd1("no-ns-alloc-error"),
3317flagpd1("mimplicit-float"),
3318flagpd1("mincremental-linker-compatible"),
3319flagpd1("minline-all-stringops"),
3320flagpd1("minvariant-function-descriptors"),
3321flagpd1("minvpcid"),
3322flagpd1("mips1"),
3323flagpd1("mips16"),
3324flagpd1("mips2"),
3325flagpd1("mips3"),
3326flagpd1("mips32"),
3327flagpd1("mips32r2"),
3328flagpd1("mips32r3"),
3329flagpd1("mips32r5"),
3330flagpd1("mips32r6"),
3331flagpd1("mips4"),
3332flagpd1("mips5"),
3333flagpd1("mips64"),
3334flagpd1("mips64r2"),
3335flagpd1("mips64r3"),
3336flagpd1("mips64r5"),
3337flagpd1("mips64r6"),
3338flagpd1("misel"),
3339flagpd1("mkernel"),
3340flagpd1("mldc1-sdc1"),
3341sepd1("mlimit-float-precision"),
3342sepd1("mlink-bitcode-file"),
3343sepd1("mlink-builtin-bitcode"),
3344sepd1("mlink-cuda-bitcode"),
3345flagpd1("mlittle-endian"),
3346sepd1("mllvm"),
3347flagpd1("mlocal-sdata"),
3348flagpd1("mlong-calls"),
3349flagpd1("mlong-double-128"),
3350flagpd1("mlong-double-64"),
3351flagpd1("mlong-double-80"),
3352flagpd1("mlongcall"),
3353flagpd1("mlwp"),
3354flagpd1("mlzcnt"),
3355flagpd1("mmadd4"),
3356flagpd1("mmemops"),
3357flagpd1("mmfcrf"),
3358flagpd1("mmfocrf"),
3359flagpd1("mmicromips"),
3360flagpd1("mmmx"),
3361flagpd1("mmovbe"),
3362flagpd1("mmovdir64b"),
3363flagpd1("mmovdiri"),
3364flagpd1("mmpx"),
3365flagpd1("mms-bitfields"),
3366flagpd1("mmsa"),
3367flagpd1("mmt"),
3368flagpd1("mmultivalue"),
3369flagpd1("mmutable-globals"),
3370flagpd1("mmwaitx"),
3371flagpd1("mno-3dnow"),
3372flagpd1("mno-3dnowa"),
3373flagpd1("mno-80387"),
3374flagpd1("mno-abicalls"),
3375flagpd1("mno-adx"),
3376flagpd1("mno-aes"),
3377flagpd1("mno-altivec"),
3378flagpd1("mno-atomics"),
3379flagpd1("mno-avx"),
3380flagpd1("mno-avx2"),
3381flagpd1("mno-avx512bf16"),
3382flagpd1("mno-avx512bitalg"),
3383flagpd1("mno-avx512bw"),
3384flagpd1("mno-avx512cd"),
3385flagpd1("mno-avx512dq"),
3386flagpd1("mno-avx512er"),
3387flagpd1("mno-avx512f"),
3388flagpd1("mno-avx512ifma"),
3389flagpd1("mno-avx512pf"),
3390flagpd1("mno-avx512vbmi"),
3391flagpd1("mno-avx512vbmi2"),
3392flagpd1("mno-avx512vl"),
3393flagpd1("mno-avx512vnni"),
3394flagpd1("mno-avx512vp2intersect"),
3395flagpd1("mno-avx512vpopcntdq"),
3396flagpd1("mno-backchain"),
3397flagpd1("mno-bmi"),
3398flagpd1("mno-bmi2"),
3399flagpd1("mno-branch-likely"),
3400flagpd1("mno-bulk-memory"),
3401flagpd1("mno-check-zero-division"),
3402flagpd1("mno-cldemote"),
3403flagpd1("mno-clflushopt"),
3404flagpd1("mno-clwb"),
3405flagpd1("mno-clzero"),
3406flagpd1("mno-cmpb"),
3407flagpd1("mno-code-object-v3"),
3408flagpd1("mno-constant-cfstrings"),
3409flagpd1("mno-crbits"),
3410flagpd1("mno-crc"),
3411flagpd1("mno-cumode"),
3412flagpd1("mno-cx16"),
3413flagpd1("mno-dsp"),
3414flagpd1("mno-dspr2"),
3415flagpd1("mno-embedded-data"),
3416flagpd1("mno-enqcmd"),
3417flagpd1("mno-exception-handling"),
3418flagpd1("mnoexecstack"),
3419flagpd1("mno-execute-only"),
3420flagpd1("mno-extern-sdata"),
3421flagpd1("mno-f16c"),
3422flagpd1("mno-fix-cortex-a53-835769"),
3423flagpd1("mno-float128"),
3424flagpd1("mno-fma"),
3425flagpd1("mno-fma4"),
3426flagpd1("mno-fprnd"),
3427flagpd1("mno-fsgsbase"),
3428flagpd1("mno-fxsr"),
3429flagpd1("mno-gfni"),
3430flagpd1("mno-ginv"),
3431flagpd1("mno-global-merge"),
3432flagpd1("mno-gpopt"),
3433flagpd1("mno-hvx"),
3434flagpd1("mno-htm"),
3435flagpd1("mno-iamcu"),
3436flagpd1("mno-implicit-float"),
3437flagpd1("mno-incremental-linker-compatible"),
3438flagpd1("mno-inline-all-stringops"),
3439flagpd1("mno-invariant-function-descriptors"),
3440flagpd1("mno-invpcid"),
3441flagpd1("mno-isel"),
3442flagpd1("mno-ldc1-sdc1"),
3443flagpd1("mno-local-sdata"),
3444flagpd1("mno-long-calls"),
3445flagpd1("mno-longcall"),
3446flagpd1("mno-lwp"),
3447flagpd1("mno-lzcnt"),
3448flagpd1("mno-madd4"),
3449flagpd1("mno-memops"),
3450flagpd1("mno-mfcrf"),
3451flagpd1("mno-mfocrf"),
3452flagpd1("mno-micromips"),
3453flagpd1("mno-mips16"),
3454flagpd1("mno-mmx"),
3455flagpd1("mno-movbe"),
3456flagpd1("mno-movdir64b"),
3457flagpd1("mno-movdiri"),
3458flagpd1("mno-movt"),
3459flagpd1("mno-mpx"),
3460flagpd1("mno-ms-bitfields"),
3461flagpd1("mno-msa"),
3462flagpd1("mno-mt"),
3463flagpd1("mno-multivalue"),
3464flagpd1("mno-mutable-globals"),
3465flagpd1("mno-mwaitx"),
3466flagpd1("mno-neg-immediates"),
3467flagpd1("mno-nontrapping-fptoint"),
3468flagpd1("mno-nvj"),
3469flagpd1("mno-nvs"),
3470flagpd1("mno-odd-spreg"),
3471flagpd1("mno-omit-leaf-frame-pointer"),
3472flagpd1("mno-outline"),
3473flagpd1("mno-packed-stack"),
3474flagpd1("mno-packets"),
3475flagpd1("mno-pascal-strings"),
3476flagpd1("mno-pclmul"),
3477flagpd1("mno-pconfig"),
3478flagpd1("mno-pie-copy-relocations"),
3479flagpd1("mno-pku"),
3480flagpd1("mno-popcnt"),
3481flagpd1("mno-popcntd"),
3482flagpd1("mno-power8-vector"),
3483flagpd1("mno-power9-vector"),
3484flagpd1("mno-prefetchwt1"),
3485flagpd1("mno-prfchw"),
3486flagpd1("mno-ptwrite"),
3487flagpd1("mno-pure-code"),
3488flagpd1("mno-qpx"),
3489flagpd1("mno-rdpid"),
3490flagpd1("mno-rdrnd"),
3491flagpd1("mno-rdseed"),
3492flagpd1("mno-red-zone"),
3493flagpd1("mno-reference-types"),
3494flagpd1("mno-relax"),
3495flagpd1("mno-relax-all"),
3496flagpd1("mno-relax-pic-calls"),
3497flagpd1("mno-restrict-it"),
3498flagpd1("mno-retpoline"),
3499flagpd1("mno-retpoline-external-thunk"),
3500flagpd1("mno-rtd"),
3501flagpd1("mno-rtm"),
3502flagpd1("mno-sahf"),
3503flagpd1("mno-save-restore"),
3504flagpd1("mno-sgx"),
3505flagpd1("mno-sha"),
3506flagpd1("mno-shstk"),
3507flagpd1("mno-sign-ext"),
3508flagpd1("mno-simd128"),
3509flagpd1("mno-soft-float"),
3510flagpd1("mno-spe"),
3511flagpd1("mno-speculative-load-hardening"),
3512flagpd1("mno-sram-ecc"),
3513flagpd1("mno-sse"),
3514flagpd1("mno-sse2"),
3515flagpd1("mno-sse3"),
3516flagpd1("mno-sse4"),
3517flagpd1("mno-sse4.1"),
3518flagpd1("mno-sse4.2"),
3519flagpd1("mno-sse4a"),
3520flagpd1("mno-ssse3"),
3521flagpd1("mno-stack-arg-probe"),
3522flagpd1("mno-stackrealign"),
3523flagpd1("mno-tail-call"),
3524flagpd1("mno-tbm"),
3525flagpd1("mno-thumb"),
3526flagpd1("mno-tls-direct-seg-refs"),
3527flagpd1("mno-unaligned-access"),
3528flagpd1("mno-unimplemented-simd128"),
3529flagpd1("mno-vaes"),
3530flagpd1("mno-virt"),
3531flagpd1("mno-vpclmulqdq"),
3532flagpd1("mno-vsx"),
3533flagpd1("mno-vx"),
3534flagpd1("mno-vzeroupper"),
3535flagpd1("mno-waitpkg"),
3536flagpd1("mno-warn-nonportable-cfstrings"),
3537flagpd1("mno-wavefrontsize64"),
3538flagpd1("mno-wbnoinvd"),
3539flagpd1("mno-x87"),
3540flagpd1("mno-xgot"),
3541flagpd1("mno-xnack"),
3542flagpd1("mno-xop"),
3543flagpd1("mno-xsave"),
3544flagpd1("mno-xsavec"),
3545flagpd1("mno-xsaveopt"),
3546flagpd1("mno-xsaves"),
3547flagpd1("mno-zero-initialized-in-bss"),
3548flagpd1("mno-zvector"),
3549flagpd1("mnocrc"),
3550flagpd1("mno-direct-move"),
3551flagpd1("mnontrapping-fptoint"),
3552flagpd1("mnop-mcount"),
3553flagpd1("mno-crypto"),
3554flagpd1("mnvj"),
3555flagpd1("mnvs"),
3556flagpd1("modd-spreg"),
3557sepd1("module-dependency-dir"),
3558flagpd1("module-file-deps"),
3559flagpd1("module-file-info"),
3560flagpd1("fmodule-private"),
3561flagpd1("fno-module-private"),
3562flagpd1("fmodulo-sched-allow-regmoves"),
3563flagpd1("fno-modulo-sched-allow-regmoves"),
3564flagpd1("fmodulo-sched"),
3565flagpd1("fno-modulo-sched"),
3566flagpd1("momit-leaf-frame-pointer"),
3567flagpd1("moutline"),
3568flagpd1("mpacked-stack"),
3569flagpd1("mpackets"),
3570flagpd1("mpascal-strings"),
3571flagpd1("mpclmul"),
3572flagpd1("mpconfig"),
3573flagpd1("mpie-copy-relocations"),
3574flagpd1("mpku"),
3575flagpd1("mpopcnt"),
3576flagpd1("mpopcntd"),
3577flagpd1("mcrypto"),
3578flagpd1("mpower8-vector"),
3579flagpd1("mpower9-vector"),
3580flagpd1("mprefetchwt1"),
3581flagpd1("mprfchw"),
3582flagpd1("mptwrite"),
3583flagpd1("mpure-code"),
3584flagpd1("mqdsp6-compat"),
3585flagpd1("mqpx"),
3586flagpd1("mrdpid"),
3587flagpd1("mrdrnd"),
3588flagpd1("mrdseed"),
3589flagpd1("mreassociate"),
3590flagpd1("mrecip"),
3591flagpd1("mrecord-mcount"),
3592flagpd1("mred-zone"),
3593flagpd1("mreference-types"),
3594sepd1("mregparm"),
3595flagpd1("mrelax"),
3596flagpd1("mrelax-all"),
3597flagpd1("mrelax-pic-calls"),
3598.{
3599 .name = "mrelax-relocations",
3600 .syntax = .flag,
3601 .zig_equivalent = .other,
3602 .pd1 = false,
3603 .pd2 = true,
3604 .psl = false,
3605},
3606sepd1("mrelocation-model"),
3607flagpd1("mrestrict-it"),
3608flagpd1("mretpoline"),
3609flagpd1("mretpoline-external-thunk"),
3610flagpd1("mrtd"),
3611flagpd1("mrtm"),
3612flagpd1("msahf"),
3613flagpd1("msave-restore"),
3614flagpd1("msave-temp-labels"),
3615flagpd1("msecure-plt"),
3616flagpd1("msgx"),
3617flagpd1("msha"),
3618flagpd1("mshstk"),
3619flagpd1("msign-ext"),
3620flagpd1("msimd128"),
3621flagpd1("msingle-float"),
3622flagpd1("msoft-float"),
3623flagpd1("mspe"),
3624flagpd1("mspeculative-load-hardening"),
3625flagpd1("msram-ecc"),
3626flagpd1("msse"),
3627flagpd1("msse2"),
3628flagpd1("msse3"),
3629flagpd1("msse4"),
3630flagpd1("msse4.1"),
3631flagpd1("msse4.2"),
3632flagpd1("msse4a"),
3633flagpd1("mssse3"),
3634flagpd1("mstack-arg-probe"),
3635flagpd1("mstackrealign"),
3636flagpd1("mstrict-align"),
3637sepd1("mt-migrate-directory"),
3638flagpd1("mtail-call"),
3639flagpd1("mtbm"),
3640sepd1("mthread-model"),
3641flagpd1("mthumb"),
3642flagpd1("mtls-direct-seg-refs"),
3643sepd1("mtp"),
3644flagpd1("mtune=?"),
3645flagpd1("muclibc"),
3646flagpd1("multi_module"),
3647sepd1("multiply_defined"),
3648sepd1("multiply_defined_unused"),
3649flagpd1("munaligned-access"),
3650flagpd1("munimplemented-simd128"),
3651flagpd1("munwind-tables"),
3652flagpd1("mv5"),
3653flagpd1("mv55"),
3654flagpd1("mv60"),
3655flagpd1("mv62"),
3656flagpd1("mv65"),
3657flagpd1("mv66"),
3658flagpd1("mvaes"),
3659flagpd1("mvirt"),
3660flagpd1("mvpclmulqdq"),
3661flagpd1("mvsx"),
3662flagpd1("mvx"),
3663flagpd1("mvzeroupper"),
3664flagpd1("mwaitpkg"),
3665flagpd1("mwarn-nonportable-cfstrings"),
3666flagpd1("mwavefrontsize64"),
3667flagpd1("mwbnoinvd"),
3668flagpd1("mx32"),
3669flagpd1("mx87"),
3670flagpd1("mxgot"),
3671flagpd1("mxnack"),
3672flagpd1("mxop"),
3673flagpd1("mxsave"),
3674flagpd1("mxsavec"),
3675flagpd1("mxsaveopt"),
3676flagpd1("mxsaves"),
3677flagpd1("mzvector"),
3678flagpd1("n"),
3679flagpd1("new-struct-path-tbaa"),
3680flagpd1("no_dead_strip_inits_and_terms"),
3681flagpd1("no-canonical-prefixes"),
3682flagpd1("no-code-completion-globals"),
3683flagpd1("no-code-completion-ns-level-decls"),
3684flagpd1("no-cpp-precomp"),
3685.{
3686 .name = "no-cuda-noopt-device-debug",
3687 .syntax = .flag,
3688 .zig_equivalent = .other,
3689 .pd1 = false,
3690 .pd2 = true,
3691 .psl = false,
3692},
3693.{
3694 .name = "no-cuda-version-check",
3695 .syntax = .flag,
3696 .zig_equivalent = .other,
3697 .pd1 = false,
3698 .pd2 = true,
3699 .psl = false,
3700},
3701flagpd1("no-emit-llvm-uselists"),
3702flagpd1("no-implicit-float"),
3703.{
3704 .name = "no-integrated-cpp",
3705 .syntax = .flag,
3706 .zig_equivalent = .other,
3707 .pd1 = true,
3708 .pd2 = true,
3709 .psl = false,
3710},
3711.{
3712 .name = "no-pedantic",
3713 .syntax = .flag,
3714 .zig_equivalent = .other,
3715 .pd1 = true,
3716 .pd2 = true,
3717 .psl = false,
3718},
3719flagpd1("no-pie"),
3720flagpd1("no-pthread"),
3721flagpd1("no-struct-path-tbaa"),
3722flagpd1("nobuiltininc"),
3723flagpd1("nocpp"),
3724flagpd1("nocudainc"),
3725flagpd1("nodefaultlibs"),
3726flagpd1("nofixprebinding"),
3727flagpd1("nogpulib"),
3728flagpd1("nolibc"),
3729flagpd1("nomultidefs"),
3730flagpd1("fnon-call-exceptions"),
3731flagpd1("fno-non-call-exceptions"),
3732flagpd1("nopie"),
3733flagpd1("noprebind"),
3734flagpd1("noprofilelib"),
3735flagpd1("noseglinkedit"),
3736flagpd1("nostartfiles"),
3737flagpd1("nostdinc"),
3738flagpd1("nostdinc++"),
3739.{
3740 .name = "nostdlib",
3741 .syntax = .flag,
3742 .zig_equivalent = .nostdlib,
3743 .pd1 = true,
3744 .pd2 = false,
3745 .psl = false,
3746},
3747flagpd1("nostdlibinc"),
3748flagpd1("nostdlib++"),
3749flagpd1("nostdsysteminc"),
3750flagpd1("objcmt-atomic-property"),
3751flagpd1("objcmt-migrate-all"),
3752flagpd1("objcmt-migrate-annotation"),
3753flagpd1("objcmt-migrate-designated-init"),
3754flagpd1("objcmt-migrate-instancetype"),
3755flagpd1("objcmt-migrate-literals"),
3756flagpd1("objcmt-migrate-ns-macros"),
3757flagpd1("objcmt-migrate-property"),
3758flagpd1("objcmt-migrate-property-dot-syntax"),
3759flagpd1("objcmt-migrate-protocol-conformance"),
3760flagpd1("objcmt-migrate-readonly-property"),
3761flagpd1("objcmt-migrate-readwrite-property"),
3762flagpd1("objcmt-migrate-subscripting"),
3763flagpd1("objcmt-ns-nonatomic-iosonly"),
3764flagpd1("objcmt-returns-innerpointer-property"),
3765flagpd1("object"),
3766sepd1("opt-record-file"),
3767sepd1("opt-record-format"),
3768sepd1("opt-record-passes"),
3769sepd1("output-asm-variant"),
3770flagpd1("p"),
3771flagpd1("fpack-derived"),
3772flagpd1("fno-pack-derived"),
3773.{
3774 .name = "pass-exit-codes",
3775 .syntax = .flag,
3776 .zig_equivalent = .other,
3777 .pd1 = true,
3778 .pd2 = true,
3779 .psl = false,
3780},
3781flagpd1("pch-through-hdrstop-create"),
3782flagpd1("pch-through-hdrstop-use"),
3783.{
3784 .name = "pedantic",
3785 .syntax = .flag,
3786 .zig_equivalent = .other,
3787 .pd1 = true,
3788 .pd2 = true,
3789 .psl = false,
3790},
3791.{
3792 .name = "pedantic-errors",
3793 .syntax = .flag,
3794 .zig_equivalent = .other,
3795 .pd1 = true,
3796 .pd2 = true,
3797 .psl = false,
3798},
3799flagpd1("fpeel-loops"),
3800flagpd1("fno-peel-loops"),
3801flagpd1("fpermissive"),
3802flagpd1("fno-permissive"),
3803flagpd1("pg"),
3804flagpd1("pic-is-pie"),
3805sepd1("pic-level"),
3806flagpd1("pie"),
3807.{
3808 .name = "pipe",
3809 .syntax = .flag,
3810 .zig_equivalent = .ignore,
3811 .pd1 = true,
3812 .pd2 = true,
3813 .psl = false,
3814},
3815sepd1("plugin"),
3816flagpd1("prebind"),
3817flagpd1("prebind_all_twolevel_modules"),
3818flagpd1("fprefetch-loop-arrays"),
3819flagpd1("fno-prefetch-loop-arrays"),
3820flagpd1("preload"),
3821flagpd1("print-dependency-directives-minimized-source"),
3822.{
3823 .name = "print-effective-triple",
3824 .syntax = .flag,
3825 .zig_equivalent = .other,
3826 .pd1 = true,
3827 .pd2 = true,
3828 .psl = false,
3829},
3830flagpd1("print-ivar-layout"),
3831.{
3832 .name = "print-libgcc-file-name",
3833 .syntax = .flag,
3834 .zig_equivalent = .other,
3835 .pd1 = true,
3836 .pd2 = true,
3837 .psl = false,
3838},
3839.{
3840 .name = "print-multi-directory",
3841 .syntax = .flag,
3842 .zig_equivalent = .other,
3843 .pd1 = true,
3844 .pd2 = true,
3845 .psl = false,
3846},
3847.{
3848 .name = "print-multi-lib",
3849 .syntax = .flag,
3850 .zig_equivalent = .other,
3851 .pd1 = true,
3852 .pd2 = true,
3853 .psl = false,
3854},
3855.{
3856 .name = "print-multi-os-directory",
3857 .syntax = .flag,
3858 .zig_equivalent = .other,
3859 .pd1 = true,
3860 .pd2 = true,
3861 .psl = false,
3862},
3863flagpd1("print-preamble"),
3864.{
3865 .name = "print-resource-dir",
3866 .syntax = .flag,
3867 .zig_equivalent = .other,
3868 .pd1 = true,
3869 .pd2 = true,
3870 .psl = false,
3871},
3872.{
3873 .name = "print-search-dirs",
3874 .syntax = .flag,
3875 .zig_equivalent = .other,
3876 .pd1 = true,
3877 .pd2 = true,
3878 .psl = false,
3879},
3880flagpd1("print-stats"),
3881.{
3882 .name = "print-supported-cpus",
3883 .syntax = .flag,
3884 .zig_equivalent = .other,
3885 .pd1 = true,
3886 .pd2 = true,
3887 .psl = false,
3888},
3889.{
3890 .name = "print-target-triple",
3891 .syntax = .flag,
3892 .zig_equivalent = .other,
3893 .pd1 = true,
3894 .pd2 = true,
3895 .psl = false,
3896},
3897flagpd1("fprintf"),
3898flagpd1("fno-printf"),
3899flagpd1("private_bundle"),
3900flagpd1("fprofile-correction"),
3901flagpd1("fno-profile-correction"),
3902flagpd1("fprofile"),
3903flagpd1("fno-profile"),
3904flagpd1("fprofile-generate-sampling"),
3905flagpd1("fno-profile-generate-sampling"),
3906flagpd1("fprofile-reusedist"),
3907flagpd1("fno-profile-reusedist"),
3908flagpd1("fprofile-values"),
3909flagpd1("fno-profile-values"),
3910flagpd1("fprotect-parens"),
3911flagpd1("fno-protect-parens"),
3912flagpd1("pthread"),
3913flagpd1("pthreads"),
3914flagpd1("r"),
3915flagpd1("frange-check"),
3916flagpd1("fno-range-check"),
3917.{
3918 .name = "rdynamic",
3919 .syntax = .flag,
3920 .zig_equivalent = .rdynamic,
3921 .pd1 = true,
3922 .pd2 = false,
3923 .psl = false,
3924},
3925sepd1("read_only_relocs"),
3926flagpd1("freal-4-real-10"),
3927flagpd1("fno-real-4-real-10"),
3928flagpd1("freal-4-real-16"),
3929flagpd1("fno-real-4-real-16"),
3930flagpd1("freal-4-real-8"),
3931flagpd1("fno-real-4-real-8"),
3932flagpd1("freal-8-real-10"),
3933flagpd1("fno-real-8-real-10"),
3934flagpd1("freal-8-real-16"),
3935flagpd1("fno-real-8-real-16"),
3936flagpd1("freal-8-real-4"),
3937flagpd1("fno-real-8-real-4"),
3938flagpd1("frealloc-lhs"),
3939flagpd1("fno-realloc-lhs"),
3940sepd1("record-command-line"),
3941flagpd1("frecursive"),
3942flagpd1("fno-recursive"),
3943flagpd1("fregs-graph"),
3944flagpd1("fno-regs-graph"),
3945flagpd1("relaxed-aliasing"),
3946.{
3947 .name = "relocatable-pch",
3948 .syntax = .flag,
3949 .zig_equivalent = .other,
3950 .pd1 = true,
3951 .pd2 = true,
3952 .psl = false,
3953},
3954flagpd1("remap"),
3955sepd1("remap-file"),
3956flagpd1("frename-registers"),
3957flagpd1("fno-rename-registers"),
3958flagpd1("freorder-blocks"),
3959flagpd1("fno-reorder-blocks"),
3960flagpd1("frepack-arrays"),
3961flagpd1("fno-repack-arrays"),
3962sepd1("resource-dir"),
3963flagpd1("rewrite-legacy-objc"),
3964flagpd1("rewrite-macros"),
3965flagpd1("rewrite-objc"),
3966flagpd1("rewrite-test"),
3967flagpd1("fripa"),
3968flagpd1("fno-ripa"),
3969sepd1("rpath"),
3970flagpd1("s"),
3971.{
3972 .name = "save-stats",
3973 .syntax = .flag,
3974 .zig_equivalent = .other,
3975 .pd1 = true,
3976 .pd2 = true,
3977 .psl = false,
3978},
3979.{
3980 .name = "save-temps",
3981 .syntax = .flag,
3982 .zig_equivalent = .other,
3983 .pd1 = true,
3984 .pd2 = true,
3985 .psl = false,
3986},
3987flagpd1("fschedule-insns2"),
3988flagpd1("fno-schedule-insns2"),
3989flagpd1("fschedule-insns"),
3990flagpd1("fno-schedule-insns"),
3991flagpd1("fsecond-underscore"),
3992flagpd1("fno-second-underscore"),
3993.{
3994 .name = "sectalign",
3995 .syntax = .{.multi_arg=3},
3996 .zig_equivalent = .other,
3997 .pd1 = true,
3998 .pd2 = false,
3999 .psl = false,
4000},
4001.{
4002 .name = "sectcreate",
4003 .syntax = .{.multi_arg=3},
4004 .zig_equivalent = .other,
4005 .pd1 = true,
4006 .pd2 = false,
4007 .psl = false,
4008},
4009.{
4010 .name = "sectobjectsymbols",
4011 .syntax = .{.multi_arg=2},
4012 .zig_equivalent = .other,
4013 .pd1 = true,
4014 .pd2 = false,
4015 .psl = false,
4016},
4017.{
4018 .name = "sectorder",
4019 .syntax = .{.multi_arg=3},
4020 .zig_equivalent = .other,
4021 .pd1 = true,
4022 .pd2 = false,
4023 .psl = false,
4024},
4025flagpd1("fsee"),
4026flagpd1("fno-see"),
4027sepd1("seg_addr_table"),
4028sepd1("seg_addr_table_filename"),
4029.{
4030 .name = "segaddr",
4031 .syntax = .{.multi_arg=2},
4032 .zig_equivalent = .other,
4033 .pd1 = true,
4034 .pd2 = false,
4035 .psl = false,
4036},
4037.{
4038 .name = "segcreate",
4039 .syntax = .{.multi_arg=3},
4040 .zig_equivalent = .other,
4041 .pd1 = true,
4042 .pd2 = false,
4043 .psl = false,
4044},
4045flagpd1("seglinkedit"),
4046.{
4047 .name = "segprot",
4048 .syntax = .{.multi_arg=3},
4049 .zig_equivalent = .other,
4050 .pd1 = true,
4051 .pd2 = false,
4052 .psl = false,
4053},
4054sepd1("segs_read_only_addr"),
4055sepd1("segs_read_write_addr"),
4056flagpd1("setup-static-analyzer"),
4057.{
4058 .name = "shared",
4059 .syntax = .flag,
4060 .zig_equivalent = .shared,
4061 .pd1 = true,
4062 .pd2 = true,
4063 .psl = false,
4064},
4065flagpd1("shared-libgcc"),
4066flagpd1("shared-libsan"),
4067flagpd1("show-encoding"),
4068.{
4069 .name = "show-includes",
4070 .syntax = .flag,
4071 .zig_equivalent = .other,
4072 .pd1 = false,
4073 .pd2 = true,
4074 .psl = false,
4075},
4076flagpd1("show-inst"),
4077flagpd1("fsign-zero"),
4078flagpd1("fno-sign-zero"),
4079flagpd1("fsignaling-nans"),
4080flagpd1("fno-signaling-nans"),
4081flagpd1("single_module"),
4082flagpd1("fsingle-precision-constant"),
4083flagpd1("fno-single-precision-constant"),
4084flagpd1("fspec-constr-count"),
4085flagpd1("fno-spec-constr-count"),
4086.{
4087 .name = "specs",
4088 .syntax = .separate,
4089 .zig_equivalent = .other,
4090 .pd1 = true,
4091 .pd2 = true,
4092 .psl = false,
4093},
4094sepd1("split-dwarf-file"),
4095sepd1("split-dwarf-output"),
4096flagpd1("split-stacks"),
4097flagpd1("fstack-arrays"),
4098flagpd1("fno-stack-arrays"),
4099flagpd1("fstack-check"),
4100flagpd1("fno-stack-check"),
4101sepd1("stack-protector"),
4102sepd1("stack-protector-buffer-size"),
4103.{
4104 .name = "static",
4105 .syntax = .flag,
4106 .zig_equivalent = .other,
4107 .pd1 = true,
4108 .pd2 = true,
4109 .psl = false,
4110},
4111flagpd1("static-define"),
4112flagpd1("static-libgcc"),
4113flagpd1("static-libgfortran"),
4114flagpd1("static-libsan"),
4115flagpd1("static-libstdc++"),
4116flagpd1("static-openmp"),
4117flagpd1("static-pie"),
4118flagpd1("fstrength-reduce"),
4119flagpd1("fno-strength-reduce"),
4120flagpd1("sys-header-deps"),
4121flagpd1("t"),
4122sepd1("target-abi"),
4123sepd1("target-cpu"),
4124sepd1("target-feature"),
4125.{
4126 .name = "target",
4127 .syntax = .separate,
4128 .zig_equivalent = .target,
4129 .pd1 = true,
4130 .pd2 = false,
4131 .psl = false,
4132},
4133sepd1("target-linker-version"),
4134flagpd1("templight-dump"),
4135flagpd1("test-coverage"),
4136flagpd1("time"),
4137flagpd1("ftls-model"),
4138flagpd1("fno-tls-model"),
4139flagpd1("ftracer"),
4140flagpd1("fno-tracer"),
4141.{
4142 .name = "traditional",
4143 .syntax = .flag,
4144 .zig_equivalent = .other,
4145 .pd1 = true,
4146 .pd2 = true,
4147 .psl = false,
4148},
4149.{
4150 .name = "traditional-cpp",
4151 .syntax = .flag,
4152 .zig_equivalent = .other,
4153 .pd1 = true,
4154 .pd2 = true,
4155 .psl = false,
4156},
4157flagpd1("ftree-dce"),
4158flagpd1("fno-tree-dce"),
4159flagpd1("ftree_loop_im"),
4160flagpd1("fno-tree_loop_im"),
4161flagpd1("ftree_loop_ivcanon"),
4162flagpd1("fno-tree_loop_ivcanon"),
4163flagpd1("ftree_loop_linear"),
4164flagpd1("fno-tree_loop_linear"),
4165flagpd1("ftree-salias"),
4166flagpd1("fno-tree-salias"),
4167flagpd1("ftree-ter"),
4168flagpd1("fno-tree-ter"),
4169flagpd1("ftree-vectorizer-verbose"),
4170flagpd1("fno-tree-vectorizer-verbose"),
4171flagpd1("ftree-vrp"),
4172flagpd1("fno-tree-vrp"),
4173.{
4174 .name = "trigraphs",
4175 .syntax = .flag,
4176 .zig_equivalent = .other,
4177 .pd1 = true,
4178 .pd2 = true,
4179 .psl = false,
4180},
4181flagpd1("trim-egraph"),
4182sepd1("triple"),
4183flagpd1("twolevel_namespace"),
4184flagpd1("twolevel_namespace_hints"),
4185sepd1("umbrella"),
4186flagpd1("undef"),
4187flagpd1("funderscoring"),
4188flagpd1("fno-underscoring"),
4189sepd1("unexported_symbols_list"),
4190flagpd1("funroll-all-loops"),
4191flagpd1("fno-unroll-all-loops"),
4192flagpd1("funsafe-loop-optimizations"),
4193flagpd1("fno-unsafe-loop-optimizations"),
4194flagpd1("funswitch-loops"),
4195flagpd1("fno-unswitch-loops"),
4196flagpd1("fuse-linker-plugin"),
4197flagpd1("fno-use-linker-plugin"),
4198flagpd1("v"),
4199flagpd1("fvariable-expansion-in-unroller"),
4200flagpd1("fno-variable-expansion-in-unroller"),
4201flagpd1("fvect-cost-model"),
4202flagpd1("fno-vect-cost-model"),
4203flagpd1("vectorize-loops"),
4204flagpd1("vectorize-slp"),
4205flagpd1("verify"),
4206.{
4207 .name = "verify-debug-info",
4208 .syntax = .flag,
4209 .zig_equivalent = .other,
4210 .pd1 = false,
4211 .pd2 = true,
4212 .psl = false,
4213},
4214flagpd1("verify-ignore-unexpected"),
4215flagpd1("verify-pch"),
4216flagpd1("version"),
4217.{
4218 .name = "via-file-asm",
4219 .syntax = .flag,
4220 .zig_equivalent = .other,
4221 .pd1 = true,
4222 .pd2 = true,
4223 .psl = false,
4224},
4225flagpd1("w"),
4226sepd1("weak_framework"),
4227sepd1("weak_library"),
4228sepd1("weak_reference_mismatches"),
4229flagpd1("fweb"),
4230flagpd1("fno-web"),
4231flagpd1("whatsloaded"),
4232flagpd1("fwhole-file"),
4233flagpd1("fno-whole-file"),
4234flagpd1("fwhole-program"),
4235flagpd1("fno-whole-program"),
4236flagpd1("whyload"),
4237sepd1("z"),
4238joinpd1("fsanitize-undefined-strip-path-components="),
4239joinpd1("fopenmp-cuda-teams-reduction-recs-num="),
4240joinpd1("analyzer-config-compatibility-mode="),
4241joinpd1("fpatchable-function-entry-offset="),
4242joinpd1("analyzer-inline-max-stack-depth="),
4243joinpd1("fsanitize-address-field-padding="),
4244joinpd1("fdiagnostics-hotness-threshold="),
4245joinpd1("fsanitize-memory-track-origins="),
4246joinpd1("mwatchos-simulator-version-min="),
4247joinpd1("mappletvsimulator-version-min="),
4248joinpd1("fobjc-nonfragile-abi-version="),
4249joinpd1("fprofile-instrument-use-path="),
4250jspd1("fxray-instrumentation-bundle="),
4251joinpd1("miphonesimulator-version-min="),
4252joinpd1("faddress-space-map-mangling="),
4253joinpd1("foptimization-record-passes="),
4254joinpd1("ftest-module-file-extension="),
4255jspd1("fxray-instruction-threshold="),
4256joinpd1("mno-default-build-attributes"),
4257joinpd1("mtvos-simulator-version-min="),
4258joinpd1("mwatchsimulator-version-min="),
4259.{
4260 .name = "include-with-prefix-before=",
4261 .syntax = .joined,
4262 .zig_equivalent = .other,
4263 .pd1 = false,
4264 .pd2 = true,
4265 .psl = false,
4266},
4267joinpd1("objcmt-white-list-dir-path="),
4268joinpd1("error-on-deserialized-decl="),
4269joinpd1("fconstexpr-backtrace-limit="),
4270joinpd1("fdiagnostics-show-category="),
4271joinpd1("fdiagnostics-show-location="),
4272joinpd1("fopenmp-cuda-blocks-per-sm="),
4273joinpd1("fsanitize-system-blacklist="),
4274jspd1("fxray-instruction-threshold"),
4275joinpd1("headerpad_max_install_names"),
4276joinpd1("mios-simulator-version-min="),
4277.{
4278 .name = "include-with-prefix-after=",
4279 .syntax = .joined,
4280 .zig_equivalent = .other,
4281 .pd1 = false,
4282 .pd2 = true,
4283 .psl = false,
4284},
4285joinpd1("fms-compatibility-version="),
4286joinpd1("fopenmp-cuda-number-of-sm="),
4287joinpd1("foptimization-record-file="),
4288joinpd1("fpatchable-function-entry="),
4289joinpd1("fsave-optimization-record="),
4290joinpd1("ftemplate-backtrace-limit="),
4291.{
4292 .name = "gpu-max-threads-per-block=",
4293 .syntax = .joined,
4294 .zig_equivalent = .other,
4295 .pd1 = false,
4296 .pd2 = true,
4297 .psl = false,
4298},
4299joinpd1("malign-branch-prefix-size="),
4300joinpd1("objcmt-whitelist-dir-path="),
4301joinpd1("Wno-nonportable-cfstrings"),
4302joinpd1("analyzer-disable-checker="),
4303joinpd1("fbuild-session-timestamp="),
4304joinpd1("fprofile-instrument-path="),
4305joinpd1("mdefault-build-attributes"),
4306joinpd1("msign-return-address-key="),
4307.{
4308 .name = "verify-ignore-unexpected=",
4309 .syntax = .comma_joined,
4310 .zig_equivalent = .other,
4311 .pd1 = true,
4312 .pd2 = false,
4313 .psl = false,
4314},
4315.{
4316 .name = "include-directory-after=",
4317 .syntax = .joined,
4318 .zig_equivalent = .other,
4319 .pd1 = false,
4320 .pd2 = true,
4321 .psl = false,
4322},
4323.{
4324 .name = "compress-debug-sections=",
4325 .syntax = .joined,
4326 .zig_equivalent = .other,
4327 .pd1 = true,
4328 .pd2 = true,
4329 .psl = false,
4330},
4331.{
4332 .name = "fcomment-block-commands=",
4333 .syntax = .comma_joined,
4334 .zig_equivalent = .other,
4335 .pd1 = true,
4336 .pd2 = false,
4337 .psl = false,
4338},
4339joinpd1("flax-vector-conversions="),
4340joinpd1("fmodules-embed-all-files"),
4341joinpd1("fmodules-prune-interval="),
4342joinpd1("foverride-record-layout="),
4343joinpd1("fprofile-instr-generate="),
4344joinpd1("fprofile-remapping-file="),
4345joinpd1("fsanitize-coverage-type="),
4346joinpd1("fsanitize-hwaddress-abi="),
4347joinpd1("ftime-trace-granularity="),
4348jspd1("fxray-always-instrument="),
4349jspd1("internal-externc-isystem"),
4350.{
4351 .name = "libomptarget-nvptx-path=",
4352 .syntax = .joined,
4353 .zig_equivalent = .other,
4354 .pd1 = false,
4355 .pd2 = true,
4356 .psl = false,
4357},
4358.{
4359 .name = "no-system-header-prefix=",
4360 .syntax = .joined,
4361 .zig_equivalent = .other,
4362 .pd1 = false,
4363 .pd2 = true,
4364 .psl = false,
4365},
4366.{
4367 .name = "output-class-directory=",
4368 .syntax = .joined,
4369 .zig_equivalent = .other,
4370 .pd1 = false,
4371 .pd2 = true,
4372 .psl = false,
4373},
4374joinpd1("analyzer-inlining-mode="),
4375joinpd1("fconstant-string-class="),
4376joinpd1("fcrash-diagnostics-dir="),
4377joinpd1("fdebug-compilation-dir="),
4378joinpd1("fdebug-default-version="),
4379joinpd1("ffp-exception-behavior="),
4380joinpd1("fmacro-backtrace-limit="),
4381joinpd1("fmax-array-constructor="),
4382joinpd1("fprofile-exclude-files="),
4383joinpd1("ftrivial-auto-var-init="),
4384jspd1("fxray-never-instrument="),
4385jspd1("interface-stub-version="),
4386joinpd1("malign-branch-boundary="),
4387joinpd1("mappletvos-version-min="),
4388joinpd1("Wnonportable-cfstrings"),
4389joinpd1("fdefault-calling-conv="),
4390joinpd1("fmax-subrecord-length="),
4391joinpd1("fmodules-ignore-macro="),
4392.{
4393 .name = "fno-sanitize-coverage=",
4394 .syntax = .comma_joined,
4395 .zig_equivalent = .other,
4396 .pd1 = true,
4397 .pd2 = false,
4398 .psl = false,
4399},
4400joinpd1("fobjc-dispatch-method="),
4401joinpd1("foperator-arrow-depth="),
4402joinpd1("fprebuilt-module-path="),
4403joinpd1("fprofile-filter-files="),
4404joinpd1("fspell-checking-limit="),
4405joinpd1("miphoneos-version-min="),
4406joinpd1("msmall-data-threshold="),
4407joinpd1("Wlarge-by-value-copy="),
4408joinpd1("analyzer-constraints="),
4409joinpd1("analyzer-dump-egraph="),
4410jspd1("compatibility_version"),
4411jspd1("dylinker_install_name"),
4412joinpd1("fcs-profile-generate="),
4413joinpd1("fmodules-prune-after="),
4414.{
4415 .name = "fno-sanitize-recover=",
4416 .syntax = .comma_joined,
4417 .zig_equivalent = .other,
4418 .pd1 = true,
4419 .pd2 = false,
4420 .psl = false,
4421},
4422jspd1("iframeworkwithsysroot"),
4423joinpd1("mamdgpu-debugger-abi="),
4424joinpd1("mprefer-vector-width="),
4425joinpd1("msign-return-address="),
4426joinpd1("mwatchos-version-min="),
4427.{
4428 .name = "system-header-prefix=",
4429 .syntax = .joined,
4430 .zig_equivalent = .other,
4431 .pd1 = false,
4432 .pd2 = true,
4433 .psl = false,
4434},
4435.{
4436 .name = "include-with-prefix=",
4437 .syntax = .joined,
4438 .zig_equivalent = .other,
4439 .pd1 = false,
4440 .pd2 = true,
4441 .psl = false,
4442},
4443joinpd1("coverage-notes-file="),
4444joinpd1("fbuild-session-file="),
4445joinpd1("fdiagnostics-format="),
4446joinpd1("fmax-stack-var-size="),
4447joinpd1("fmodules-cache-path="),
4448joinpd1("fmodules-embed-file="),
4449joinpd1("fprofile-instrument="),
4450joinpd1("fprofile-sample-use="),
4451joinpd1("fsanitize-blacklist="),
4452.{
4453 .name = "hip-device-lib-path=",
4454 .syntax = .joined,
4455 .zig_equivalent = .other,
4456 .pd1 = false,
4457 .pd2 = true,
4458 .psl = false,
4459},
4460joinpd1("mmacosx-version-min="),
4461.{
4462 .name = "no-cuda-include-ptx=",
4463 .syntax = .joined,
4464 .zig_equivalent = .other,
4465 .pd1 = false,
4466 .pd2 = true,
4467 .psl = false,
4468},
4469joinpd1("Wframe-larger-than="),
4470joinpd1("code-completion-at="),
4471joinpd1("coverage-data-file="),
4472joinpd1("fblas-matmul-limit="),
4473joinpd1("fdiagnostics-color="),
4474joinpd1("ffixed-line-length-"),
4475joinpd1("flimited-precision="),
4476joinpd1("fprofile-instr-use="),
4477.{
4478 .name = "fsanitize-coverage=",
4479 .syntax = .comma_joined,
4480 .zig_equivalent = .other,
4481 .pd1 = true,
4482 .pd2 = false,
4483 .psl = false,
4484},
4485joinpd1("fthin-link-bitcode="),
4486joinpd1("mbranch-protection="),
4487joinpd1("mmacos-version-min="),
4488joinpd1("pch-through-header="),
4489joinpd1("target-sdk-version="),
4490.{
4491 .name = "execution-charset:",
4492 .syntax = .joined,
4493 .zig_equivalent = .other,
4494 .pd1 = true,
4495 .pd2 = false,
4496 .psl = true,
4497},
4498.{
4499 .name = "include-directory=",
4500 .syntax = .joined,
4501 .zig_equivalent = .other,
4502 .pd1 = false,
4503 .pd2 = true,
4504 .psl = false,
4505},
4506.{
4507 .name = "library-directory=",
4508 .syntax = .joined,
4509 .zig_equivalent = .other,
4510 .pd1 = false,
4511 .pd2 = true,
4512 .psl = false,
4513},
4514.{
4515 .name = "config-system-dir=",
4516 .syntax = .joined,
4517 .zig_equivalent = .other,
4518 .pd1 = false,
4519 .pd2 = true,
4520 .psl = false,
4521},
4522joinpd1("fclang-abi-compat="),
4523joinpd1("fcompile-resource="),
4524joinpd1("fdebug-prefix-map="),
4525joinpd1("fdenormal-fp-math="),
4526joinpd1("fexcess-precision="),
4527joinpd1("ffree-line-length-"),
4528joinpd1("fmacro-prefix-map="),
4529.{
4530 .name = "fno-sanitize-trap=",
4531 .syntax = .comma_joined,
4532 .zig_equivalent = .other,
4533 .pd1 = true,
4534 .pd2 = false,
4535 .psl = false,
4536},
4537joinpd1("fobjc-abi-version="),
4538joinpd1("foutput-class-dir="),
4539joinpd1("fprofile-generate="),
4540joinpd1("frewrite-map-file="),
4541.{
4542 .name = "fsanitize-recover=",
4543 .syntax = .comma_joined,
4544 .zig_equivalent = .other,
4545 .pd1 = true,
4546 .pd2 = false,
4547 .psl = false,
4548},
4549joinpd1("fsymbol-partition="),
4550joinpd1("mcompact-branches="),
4551joinpd1("mstack-probe-size="),
4552joinpd1("mtvos-version-min="),
4553joinpd1("working-directory="),
4554joinpd1("analyze-function="),
4555joinpd1("analyzer-checker="),
4556joinpd1("coverage-version="),
4557.{
4558 .name = "cuda-include-ptx=",
4559 .syntax = .joined,
4560 .zig_equivalent = .other,
4561 .pd1 = false,
4562 .pd2 = true,
4563 .psl = false,
4564},
4565joinpd1("falign-functions="),
4566joinpd1("fconstexpr-depth="),
4567joinpd1("fconstexpr-steps="),
4568joinpd1("ffile-prefix-map="),
4569joinpd1("fmodule-map-file="),
4570joinpd1("fobjc-arc-cxxlib="),
4571jspd1("iwithprefixbefore"),
4572joinpd1("malign-functions="),
4573joinpd1("mios-version-min="),
4574joinpd1("mstack-alignment="),
4575.{
4576 .name = "no-cuda-gpu-arch=",
4577 .syntax = .joined,
4578 .zig_equivalent = .other,
4579 .pd1 = false,
4580 .pd2 = true,
4581 .psl = false,
4582},
4583jspd1("working-directory"),
4584joinpd1("analyzer-output="),
4585.{
4586 .name = "config-user-dir=",
4587 .syntax = .joined,
4588 .zig_equivalent = .other,
4589 .pd1 = false,
4590 .pd2 = true,
4591 .psl = false,
4592},
4593joinpd1("debug-info-kind="),
4594joinpd1("debugger-tuning="),
4595joinpd1("fcf-runtime-abi="),
4596joinpd1("finit-character="),
4597joinpd1("fmax-type-align="),
4598joinpd1("fmessage-length="),
4599.{
4600 .name = "fopenmp-targets=",
4601 .syntax = .comma_joined,
4602 .zig_equivalent = .other,
4603 .pd1 = true,
4604 .pd2 = false,
4605 .psl = false,
4606},
4607joinpd1("fopenmp-version="),
4608joinpd1("fshow-overloads="),
4609joinpd1("ftemplate-depth-"),
4610joinpd1("ftemplate-depth="),
4611jspd1("fxray-attr-list="),
4612jspd1("internal-isystem"),
4613joinpd1("mlinker-version="),
4614.{
4615 .name = "print-file-name=",
4616 .syntax = .joined,
4617 .zig_equivalent = .other,
4618 .pd1 = true,
4619 .pd2 = true,
4620 .psl = false,
4621},
4622.{
4623 .name = "print-prog-name=",
4624 .syntax = .joined,
4625 .zig_equivalent = .other,
4626 .pd1 = true,
4627 .pd2 = true,
4628 .psl = false,
4629},
4630jspd1("stdlib++-isystem"),
4631joinpd1("Rpass-analysis="),
4632.{
4633 .name = "Xopenmp-target=",
4634 .syntax = .joined_and_separate,
4635 .zig_equivalent = .other,
4636 .pd1 = true,
4637 .pd2 = false,
4638 .psl = false,
4639},
4640.{
4641 .name = "source-charset:",
4642 .syntax = .joined,
4643 .zig_equivalent = .other,
4644 .pd1 = true,
4645 .pd2 = false,
4646 .psl = true,
4647},
4648.{
4649 .name = "analyzer-output",
4650 .syntax = .joined_or_separate,
4651 .zig_equivalent = .other,
4652 .pd1 = false,
4653 .pd2 = true,
4654 .psl = false,
4655},
4656.{
4657 .name = "include-prefix=",
4658 .syntax = .joined,
4659 .zig_equivalent = .other,
4660 .pd1 = false,
4661 .pd2 = true,
4662 .psl = false,
4663},
4664.{
4665 .name = "undefine-macro=",
4666 .syntax = .joined,
4667 .zig_equivalent = .other,
4668 .pd1 = false,
4669 .pd2 = true,
4670 .psl = false,
4671},
4672joinpd1("analyzer-purge="),
4673joinpd1("analyzer-store="),
4674jspd1("current_version"),
4675joinpd1("fbootclasspath="),
4676joinpd1("fbracket-depth="),
4677joinpd1("fcf-protection="),
4678joinpd1("fdepfile-entry="),
4679joinpd1("fembed-bitcode="),
4680joinpd1("finput-charset="),
4681joinpd1("fmodule-format="),
4682joinpd1("fms-memptr-rep="),
4683joinpd1("fnew-alignment="),
4684joinpd1("frecord-marker="),
4685.{
4686 .name = "fsanitize-trap=",
4687 .syntax = .comma_joined,
4688 .zig_equivalent = .other,
4689 .pd1 = true,
4690 .pd2 = false,
4691 .psl = false,
4692},
4693joinpd1("fthinlto-index="),
4694joinpd1("ftrap-function="),
4695joinpd1("ftrapv-handler="),
4696.{
4697 .name = "hip-device-lib=",
4698 .syntax = .joined,
4699 .zig_equivalent = .other,
4700 .pd1 = false,
4701 .pd2 = true,
4702 .psl = false,
4703},
4704joinpd1("mdynamic-no-pic"),
4705joinpd1("mframe-pointer="),
4706joinpd1("mindirect-jump="),
4707joinpd1("preamble-bytes="),
4708.{
4709 .name = "bootclasspath=",
4710 .syntax = .joined,
4711 .zig_equivalent = .other,
4712 .pd1 = false,
4713 .pd2 = true,
4714 .psl = false,
4715},
4716.{
4717 .name = "cuda-gpu-arch=",
4718 .syntax = .joined,
4719 .zig_equivalent = .other,
4720 .pd1 = false,
4721 .pd2 = true,
4722 .psl = false,
4723},
4724.{
4725 .name = "dependent-lib=",
4726 .syntax = .joined,
4727 .zig_equivalent = .other,
4728 .pd1 = false,
4729 .pd2 = true,
4730 .psl = false,
4731},
4732joinpd1("dwarf-version="),
4733joinpd1("falign-labels="),
4734joinpd1("fauto-profile="),
4735joinpd1("fexec-charset="),
4736joinpd1("fgnuc-version="),
4737joinpd1("finit-integer="),
4738joinpd1("finit-logical="),
4739joinpd1("finline-limit="),
4740joinpd1("fobjc-runtime="),
4741.{
4742 .name = "gcc-toolchain=",
4743 .syntax = .joined,
4744 .zig_equivalent = .other,
4745 .pd1 = false,
4746 .pd2 = true,
4747 .psl = false,
4748},
4749.{
4750 .name = "linker-option=",
4751 .syntax = .joined,
4752 .zig_equivalent = .other,
4753 .pd1 = false,
4754 .pd2 = true,
4755 .psl = false,
4756},
4757.{
4758 .name = "malign-branch=",
4759 .syntax = .comma_joined,
4760 .zig_equivalent = .other,
4761 .pd1 = true,
4762 .pd2 = false,
4763 .psl = false,
4764},
4765jspd1("objcxx-isystem"),
4766joinpd1("vtordisp-mode="),
4767joinpd1("Rpass-missed="),
4768joinpd1("Wlarger-than-"),
4769joinpd1("Wlarger-than="),
4770.{
4771 .name = "define-macro=",
4772 .syntax = .joined,
4773 .zig_equivalent = .other,
4774 .pd1 = false,
4775 .pd2 = true,
4776 .psl = false,
4777},
4778joinpd1("ast-dump-all="),
4779.{
4780 .name = "autocomplete=",
4781 .syntax = .joined,
4782 .zig_equivalent = .other,
4783 .pd1 = false,
4784 .pd2 = true,
4785 .psl = false,
4786},
4787joinpd1("falign-jumps="),
4788joinpd1("falign-loops="),
4789joinpd1("faligned-new="),
4790joinpd1("ferror-limit="),
4791joinpd1("ffp-contract="),
4792joinpd1("fmodule-file="),
4793joinpd1("fmodule-name="),
4794joinpd1("fmsc-version="),
4795.{
4796 .name = "fno-sanitize=",
4797 .syntax = .comma_joined,
4798 .zig_equivalent = .other,
4799 .pd1 = true,
4800 .pd2 = false,
4801 .psl = false,
4802},
4803joinpd1("fpack-struct="),
4804joinpd1("fpass-plugin="),
4805joinpd1("fprofile-dir="),
4806joinpd1("fprofile-use="),
4807joinpd1("frandom-seed="),
4808joinpd1("gsplit-dwarf="),
4809jspd1("isystem-after"),
4810joinpd1("malign-jumps="),
4811joinpd1("malign-loops="),
4812joinpd1("mimplicit-it="),
4813jspd1("pagezero_size"),
4814joinpd1("resource-dir="),
4815.{
4816 .name = "dyld-prefix=",
4817 .syntax = .joined,
4818 .zig_equivalent = .other,
4819 .pd1 = false,
4820 .pd2 = true,
4821 .psl = false,
4822},
4823.{
4824 .name = "driver-mode=",
4825 .syntax = .joined,
4826 .zig_equivalent = .other,
4827 .pd1 = false,
4828 .pd2 = true,
4829 .psl = false,
4830},
4831joinpd1("fmax-errors="),
4832joinpd1("fno-builtin-"),
4833joinpd1("fvisibility="),
4834joinpd1("fwchar-type="),
4835jspd1("fxray-modes="),
4836jspd1("iwithsysroot"),
4837joinpd1("mhvx-length="),
4838jspd1("objc-isystem"),
4839.{
4840 .name = "rsp-quoting=",
4841 .syntax = .joined,
4842 .zig_equivalent = .other,
4843 .pd1 = false,
4844 .pd2 = true,
4845 .psl = false,
4846},
4847joinpd1("std-default="),
4848jspd1("sub_umbrella"),
4849.{
4850 .name = "Qpar-report",
4851 .syntax = .joined,
4852 .zig_equivalent = .other,
4853 .pd1 = true,
4854 .pd2 = false,
4855 .psl = true,
4856},
4857.{
4858 .name = "Qvec-report",
4859 .syntax = .joined,
4860 .zig_equivalent = .other,
4861 .pd1 = true,
4862 .pd2 = false,
4863 .psl = true,
4864},
4865.{
4866 .name = "errorReport",
4867 .syntax = .joined,
4868 .zig_equivalent = .other,
4869 .pd1 = true,
4870 .pd2 = false,
4871 .psl = true,
4872},
4873.{
4874 .name = "for-linker=",
4875 .syntax = .joined,
4876 .zig_equivalent = .other,
4877 .pd1 = false,
4878 .pd2 = true,
4879 .psl = false,
4880},
4881.{
4882 .name = "force-link=",
4883 .syntax = .joined,
4884 .zig_equivalent = .other,
4885 .pd1 = false,
4886 .pd2 = true,
4887 .psl = false,
4888},
4889jspd1("client_name"),
4890jspd1("cxx-isystem"),
4891joinpd1("fclasspath="),
4892joinpd1("finit-real="),
4893joinpd1("fforce-addr"),
4894joinpd1("ftls-model="),
4895jspd1("ivfsoverlay"),
4896jspd1("iwithprefix"),
4897joinpd1("mfloat-abi="),
4898.{
4899 .name = "plugin-arg-",
4900 .syntax = .joined_and_separate,
4901 .zig_equivalent = .other,
4902 .pd1 = true,
4903 .pd2 = false,
4904 .psl = false,
4905},
4906.{
4907 .name = "ptxas-path=",
4908 .syntax = .joined,
4909 .zig_equivalent = .other,
4910 .pd1 = false,
4911 .pd2 = true,
4912 .psl = false,
4913},
4914.{
4915 .name = "save-stats=",
4916 .syntax = .joined,
4917 .zig_equivalent = .other,
4918 .pd1 = true,
4919 .pd2 = true,
4920 .psl = false,
4921},
4922.{
4923 .name = "save-temps=",
4924 .syntax = .joined,
4925 .zig_equivalent = .other,
4926 .pd1 = true,
4927 .pd2 = true,
4928 .psl = false,
4929},
4930joinpd1("stats-file="),
4931jspd1("sub_library"),
4932.{
4933 .name = "CLASSPATH=",
4934 .syntax = .joined,
4935 .zig_equivalent = .other,
4936 .pd1 = false,
4937 .pd2 = true,
4938 .psl = false,
4939},
4940.{
4941 .name = "constexpr:",
4942 .syntax = .joined,
4943 .zig_equivalent = .other,
4944 .pd1 = true,
4945 .pd2 = false,
4946 .psl = true,
4947},
4948.{
4949 .name = "classpath=",
4950 .syntax = .joined,
4951 .zig_equivalent = .other,
4952 .pd1 = false,
4953 .pd2 = true,
4954 .psl = false,
4955},
4956.{
4957 .name = "cuda-path=",
4958 .syntax = .joined,
4959 .zig_equivalent = .other,
4960 .pd1 = false,
4961 .pd2 = true,
4962 .psl = false,
4963},
4964joinpd1("fencoding="),
4965joinpd1("ffp-model="),
4966joinpd1("ffpe-trap="),
4967joinpd1("flto-jobs="),
4968.{
4969 .name = "fsanitize=",
4970 .syntax = .comma_joined,
4971 .zig_equivalent = .sanitize,
4972 .pd1 = true,
4973 .pd2 = false,
4974 .psl = false,
4975},
4976jspd1("iframework"),
4977joinpd1("mtls-size="),
4978joinpd1("segs_read_"),
4979.{
4980 .name = "unwindlib=",
4981 .syntax = .joined,
4982 .zig_equivalent = .other,
4983 .pd1 = true,
4984 .pd2 = true,
4985 .psl = false,
4986},
4987.{
4988 .name = "cgthreads",
4989 .syntax = .joined,
4990 .zig_equivalent = .other,
4991 .pd1 = true,
4992 .pd2 = false,
4993 .psl = true,
4994},
4995.{
4996 .name = "encoding=",
4997 .syntax = .joined,
4998 .zig_equivalent = .other,
4999 .pd1 = false,
5000 .pd2 = true,
5001 .psl = false,
5002},
5003.{
5004 .name = "language=",
5005 .syntax = .joined,
5006 .zig_equivalent = .other,
5007 .pd1 = false,
5008 .pd2 = true,
5009 .psl = false,
5010},
5011.{
5012 .name = "optimize=",
5013 .syntax = .joined,
5014 .zig_equivalent = .optimize,
5015 .pd1 = false,
5016 .pd2 = true,
5017 .psl = false,
5018},
5019.{
5020 .name = "resource=",
5021 .syntax = .joined,
5022 .zig_equivalent = .other,
5023 .pd1 = false,
5024 .pd2 = true,
5025 .psl = false,
5026},
5027joinpd1("ast-dump="),
5028jspd1("c-isystem"),
5029joinpd1("fcoarray="),
5030joinpd1("fconvert="),
5031joinpd1("fextdirs="),
5032joinpd1("ftabstop="),
5033jspd1("idirafter"),
5034joinpd1("mregparm="),
5035jspd1("undefined"),
5036.{
5037 .name = "extdirs=",
5038 .syntax = .joined,
5039 .zig_equivalent = .other,
5040 .pd1 = false,
5041 .pd2 = true,
5042 .psl = false,
5043},
5044.{
5045 .name = "imacros=",
5046 .syntax = .joined,
5047 .zig_equivalent = .other,
5048 .pd1 = false,
5049 .pd2 = true,
5050 .psl = false,
5051},
5052.{
5053 .name = "include=",
5054 .syntax = .joined,
5055 .zig_equivalent = .other,
5056 .pd1 = false,
5057 .pd2 = true,
5058 .psl = false,
5059},
5060.{
5061 .name = "sysroot=",
5062 .syntax = .joined,
5063 .zig_equivalent = .other,
5064 .pd1 = false,
5065 .pd2 = true,
5066 .psl = false,
5067},
5068joinpd1("fopenmp="),
5069joinpd1("fplugin="),
5070joinpd1("fuse-ld="),
5071joinpd1("fveclib="),
5072jspd1("isysroot"),
5073joinpd1("mcmodel="),
5074joinpd1("mconsole"),
5075joinpd1("mfpmath="),
5076joinpd1("mhwmult="),
5077joinpd1("mthreads"),
5078joinpd1("municode"),
5079joinpd1("mwindows"),
5080jspd1("seg1addr"),
5081.{
5082 .name = "assert=",
5083 .syntax = .joined,
5084 .zig_equivalent = .other,
5085 .pd1 = false,
5086 .pd2 = true,
5087 .psl = false,
5088},
5089.{
5090 .name = "mhwdiv=",
5091 .syntax = .joined,
5092 .zig_equivalent = .other,
5093 .pd1 = false,
5094 .pd2 = true,
5095 .psl = false,
5096},
5097.{
5098 .name = "output=",
5099 .syntax = .joined,
5100 .zig_equivalent = .other,
5101 .pd1 = false,
5102 .pd2 = true,
5103 .psl = false,
5104},
5105.{
5106 .name = "prefix=",
5107 .syntax = .joined,
5108 .zig_equivalent = .other,
5109 .pd1 = false,
5110 .pd2 = true,
5111 .psl = false,
5112},
5113.{
5114 .name = "cl-ext=",
5115 .syntax = .comma_joined,
5116 .zig_equivalent = .other,
5117 .pd1 = true,
5118 .pd2 = false,
5119 .psl = false,
5120},
5121joinpd1("cl-std="),
5122joinpd1("fcheck="),
5123.{
5124 .name = "imacros",
5125 .syntax = .joined_or_separate,
5126 .zig_equivalent = .other,
5127 .pd1 = true,
5128 .pd2 = true,
5129 .psl = false,
5130},
5131.{
5132 .name = "include",
5133 .syntax = .joined_or_separate,
5134 .zig_equivalent = .other,
5135 .pd1 = true,
5136 .pd2 = true,
5137 .psl = false,
5138},
5139jspd1("iprefix"),
5140jspd1("isystem"),
5141joinpd1("mhwdiv="),
5142joinpd1("moslib="),
5143.{
5144 .name = "mrecip=",
5145 .syntax = .comma_joined,
5146 .zig_equivalent = .other,
5147 .pd1 = true,
5148 .pd2 = false,
5149 .psl = false,
5150},
5151.{
5152 .name = "stdlib=",
5153 .syntax = .joined,
5154 .zig_equivalent = .other,
5155 .pd1 = true,
5156 .pd2 = true,
5157 .psl = false,
5158},
5159.{
5160 .name = "target=",
5161 .syntax = .joined,
5162 .zig_equivalent = .target,
5163 .pd1 = false,
5164 .pd2 = true,
5165 .psl = false,
5166},
5167joinpd1("triple="),
5168.{
5169 .name = "verify=",
5170 .syntax = .comma_joined,
5171 .zig_equivalent = .other,
5172 .pd1 = true,
5173 .pd2 = false,
5174 .psl = false,
5175},
5176joinpd1("Rpass="),
5177.{
5178 .name = "Xarch_",
5179 .syntax = .joined_and_separate,
5180 .zig_equivalent = .other,
5181 .pd1 = true,
5182 .pd2 = false,
5183 .psl = false,
5184},
5185.{
5186 .name = "clang:",
5187 .syntax = .joined,
5188 .zig_equivalent = .other,
5189 .pd1 = true,
5190 .pd2 = false,
5191 .psl = true,
5192},
5193.{
5194 .name = "guard:",
5195 .syntax = .joined,
5196 .zig_equivalent = .other,
5197 .pd1 = true,
5198 .pd2 = false,
5199 .psl = true,
5200},
5201.{
5202 .name = "debug=",
5203 .syntax = .joined,
5204 .zig_equivalent = .debug,
5205 .pd1 = false,
5206 .pd2 = true,
5207 .psl = false,
5208},
5209.{
5210 .name = "param=",
5211 .syntax = .joined,
5212 .zig_equivalent = .other,
5213 .pd1 = false,
5214 .pd2 = true,
5215 .psl = false,
5216},
5217.{
5218 .name = "warn-=",
5219 .syntax = .joined,
5220 .zig_equivalent = .other,
5221 .pd1 = false,
5222 .pd2 = true,
5223 .psl = false,
5224},
5225joinpd1("fixit="),
5226joinpd1("gstabs"),
5227joinpd1("gxcoff"),
5228jspd1("iquote"),
5229joinpd1("march="),
5230joinpd1("mtune="),
5231.{
5232 .name = "rtlib=",
5233 .syntax = .joined,
5234 .zig_equivalent = .other,
5235 .pd1 = true,
5236 .pd2 = true,
5237 .psl = false,
5238},
5239.{
5240 .name = "specs=",
5241 .syntax = .joined,
5242 .zig_equivalent = .other,
5243 .pd1 = true,
5244 .pd2 = true,
5245 .psl = false,
5246},
5247joinpd1("weak-l"),
5248.{
5249 .name = "Ofast",
5250 .syntax = .joined,
5251 .zig_equivalent = .optimize,
5252 .pd1 = true,
5253 .pd2 = false,
5254 .psl = false,
5255},
5256jspd1("Tdata"),
5257jspd1("Ttext"),
5258.{
5259 .name = "arch:",
5260 .syntax = .joined,
5261 .zig_equivalent = .other,
5262 .pd1 = true,
5263 .pd2 = false,
5264 .psl = true,
5265},
5266.{
5267 .name = "favor",
5268 .syntax = .joined,
5269 .zig_equivalent = .other,
5270 .pd1 = true,
5271 .pd2 = false,
5272 .psl = true,
5273},
5274.{
5275 .name = "imsvc",
5276 .syntax = .joined_or_separate,
5277 .zig_equivalent = .other,
5278 .pd1 = true,
5279 .pd2 = false,
5280 .psl = true,
5281},
5282.{
5283 .name = "warn-",
5284 .syntax = .joined,
5285 .zig_equivalent = .other,
5286 .pd1 = false,
5287 .pd2 = true,
5288 .psl = false,
5289},
5290joinpd1("flto="),
5291joinpd1("gcoff"),
5292joinpd1("mabi="),
5293joinpd1("mabs="),
5294joinpd1("masm="),
5295joinpd1("mcpu="),
5296joinpd1("mfpu="),
5297joinpd1("mhvx="),
5298joinpd1("mmcu="),
5299joinpd1("mnan="),
5300jspd1("Tbss"),
5301.{
5302 .name = "link",
5303 .syntax = .remaining_args_joined,
5304 .zig_equivalent = .other,
5305 .pd1 = true,
5306 .pd2 = false,
5307 .psl = true,
5308},
5309.{
5310 .name = "std:",
5311 .syntax = .joined,
5312 .zig_equivalent = .other,
5313 .pd1 = true,
5314 .pd2 = false,
5315 .psl = true,
5316},
5317joinpd1("ccc-"),
5318joinpd1("gvms"),
5319joinpd1("mdll"),
5320joinpd1("mtp="),
5321.{
5322 .name = "std=",
5323 .syntax = .joined,
5324 .zig_equivalent = .other,
5325 .pd1 = true,
5326 .pd2 = true,
5327 .psl = false,
5328},
5329.{
5330 .name = "Wa,",
5331 .syntax = .comma_joined,
5332 .zig_equivalent = .other,
5333 .pd1 = true,
5334 .pd2 = false,
5335 .psl = false,
5336},
5337.{
5338 .name = "Wl,",
5339 .syntax = .comma_joined,
5340 .zig_equivalent = .wl,
5341 .pd1 = true,
5342 .pd2 = false,
5343 .psl = false,
5344},
5345.{
5346 .name = "Wp,",
5347 .syntax = .comma_joined,
5348 .zig_equivalent = .other,
5349 .pd1 = true,
5350 .pd2 = false,
5351 .psl = false,
5352},
5353.{
5354 .name = "RTC",
5355 .syntax = .joined,
5356 .zig_equivalent = .other,
5357 .pd1 = true,
5358 .pd2 = false,
5359 .psl = true,
5360},
5361.{
5362 .name = "Zc:",
5363 .syntax = .joined,
5364 .zig_equivalent = .other,
5365 .pd1 = true,
5366 .pd2 = false,
5367 .psl = true,
5368},
5369.{
5370 .name = "clr",
5371 .syntax = .joined,
5372 .zig_equivalent = .other,
5373 .pd1 = true,
5374 .pd2 = false,
5375 .psl = true,
5376},
5377.{
5378 .name = "doc",
5379 .syntax = .joined,
5380 .zig_equivalent = .other,
5381 .pd1 = true,
5382 .pd2 = false,
5383 .psl = true,
5384},
5385joinpd1("gz="),
5386joinpd1("A-"),
5387joinpd1("G="),
5388jspd1("MF"),
5389jspd1("MJ"),
5390jspd1("MQ"),
5391jspd1("MT"),
5392.{
5393 .name = "AI",
5394 .syntax = .joined_or_separate,
5395 .zig_equivalent = .other,
5396 .pd1 = true,
5397 .pd2 = false,
5398 .psl = true,
5399},
5400.{
5401 .name = "EH",
5402 .syntax = .joined,
5403 .zig_equivalent = .other,
5404 .pd1 = true,
5405 .pd2 = false,
5406 .psl = true,
5407},
5408.{
5409 .name = "FA",
5410 .syntax = .joined,
5411 .zig_equivalent = .other,
5412 .pd1 = true,
5413 .pd2 = false,
5414 .psl = true,
5415},
5416.{
5417 .name = "FI",
5418 .syntax = .joined_or_separate,
5419 .zig_equivalent = .other,
5420 .pd1 = true,
5421 .pd2 = false,
5422 .psl = true,
5423},
5424.{
5425 .name = "FR",
5426 .syntax = .joined,
5427 .zig_equivalent = .other,
5428 .pd1 = true,
5429 .pd2 = false,
5430 .psl = true,
5431},
5432.{
5433 .name = "FU",
5434 .syntax = .joined_or_separate,
5435 .zig_equivalent = .other,
5436 .pd1 = true,
5437 .pd2 = false,
5438 .psl = true,
5439},
5440.{
5441 .name = "Fa",
5442 .syntax = .joined,
5443 .zig_equivalent = .other,
5444 .pd1 = true,
5445 .pd2 = false,
5446 .psl = true,
5447},
5448.{
5449 .name = "Fd",
5450 .syntax = .joined,
5451 .zig_equivalent = .other,
5452 .pd1 = true,
5453 .pd2 = false,
5454 .psl = true,
5455},
5456.{
5457 .name = "Fe",
5458 .syntax = .joined,
5459 .zig_equivalent = .other,
5460 .pd1 = true,
5461 .pd2 = false,
5462 .psl = true,
5463},
5464.{
5465 .name = "Fi",
5466 .syntax = .joined,
5467 .zig_equivalent = .other,
5468 .pd1 = true,
5469 .pd2 = false,
5470 .psl = true,
5471},
5472.{
5473 .name = "Fm",
5474 .syntax = .joined,
5475 .zig_equivalent = .other,
5476 .pd1 = true,
5477 .pd2 = false,
5478 .psl = true,
5479},
5480.{
5481 .name = "Fo",
5482 .syntax = .joined,
5483 .zig_equivalent = .other,
5484 .pd1 = true,
5485 .pd2 = false,
5486 .psl = true,
5487},
5488.{
5489 .name = "Fp",
5490 .syntax = .joined,
5491 .zig_equivalent = .other,
5492 .pd1 = true,
5493 .pd2 = false,
5494 .psl = true,
5495},
5496.{
5497 .name = "Fr",
5498 .syntax = .joined,
5499 .zig_equivalent = .other,
5500 .pd1 = true,
5501 .pd2 = false,
5502 .psl = true,
5503},
5504.{
5505 .name = "Gs",
5506 .syntax = .joined,
5507 .zig_equivalent = .other,
5508 .pd1 = true,
5509 .pd2 = false,
5510 .psl = true,
5511},
5512.{
5513 .name = "MP",
5514 .syntax = .joined,
5515 .zig_equivalent = .other,
5516 .pd1 = true,
5517 .pd2 = false,
5518 .psl = true,
5519},
5520.{
5521 .name = "Tc",
5522 .syntax = .joined_or_separate,
5523 .zig_equivalent = .other,
5524 .pd1 = true,
5525 .pd2 = false,
5526 .psl = true,
5527},
5528.{
5529 .name = "Tp",
5530 .syntax = .joined_or_separate,
5531 .zig_equivalent = .other,
5532 .pd1 = true,
5533 .pd2 = false,
5534 .psl = true,
5535},
5536.{
5537 .name = "Yc",
5538 .syntax = .joined,
5539 .zig_equivalent = .other,
5540 .pd1 = true,
5541 .pd2 = false,
5542 .psl = true,
5543},
5544.{
5545 .name = "Yl",
5546 .syntax = .joined,
5547 .zig_equivalent = .other,
5548 .pd1 = true,
5549 .pd2 = false,
5550 .psl = true,
5551},
5552.{
5553 .name = "Yu",
5554 .syntax = .joined,
5555 .zig_equivalent = .other,
5556 .pd1 = true,
5557 .pd2 = false,
5558 .psl = true,
5559},
5560.{
5561 .name = "ZW",
5562 .syntax = .joined,
5563 .zig_equivalent = .other,
5564 .pd1 = true,
5565 .pd2 = false,
5566 .psl = true,
5567},
5568.{
5569 .name = "Zm",
5570 .syntax = .joined,
5571 .zig_equivalent = .other,
5572 .pd1 = true,
5573 .pd2 = false,
5574 .psl = true,
5575},
5576.{
5577 .name = "Zp",
5578 .syntax = .joined,
5579 .zig_equivalent = .other,
5580 .pd1 = true,
5581 .pd2 = false,
5582 .psl = true,
5583},
5584.{
5585 .name = "d2",
5586 .syntax = .joined,
5587 .zig_equivalent = .other,
5588 .pd1 = true,
5589 .pd2 = false,
5590 .psl = true,
5591},
5592.{
5593 .name = "vd",
5594 .syntax = .joined,
5595 .zig_equivalent = .other,
5596 .pd1 = true,
5597 .pd2 = false,
5598 .psl = true,
5599},
5600jspd1("A"),
5601jspd1("B"),
5602jspd1("D"),
5603jspd1("F"),
5604jspd1("G"),
5605jspd1("I"),
5606jspd1("J"),
5607jspd1("L"),
5608.{
5609 .name = "O",
5610 .syntax = .joined,
5611 .zig_equivalent = .optimize,
5612 .pd1 = true,
5613 .pd2 = false,
5614 .psl = false,
5615},
5616joinpd1("R"),
5617jspd1("T"),
5618jspd1("U"),
5619jspd1("V"),
5620joinpd1("W"),
5621joinpd1("X"),
5622joinpd1("Z"),
5623.{
5624 .name = "D",
5625 .syntax = .joined_or_separate,
5626 .zig_equivalent = .other,
5627 .pd1 = true,
5628 .pd2 = false,
5629 .psl = true,
5630},
5631.{
5632 .name = "F",
5633 .syntax = .joined_or_separate,
5634 .zig_equivalent = .other,
5635 .pd1 = true,
5636 .pd2 = false,
5637 .psl = true,
5638},
5639.{
5640 .name = "I",
5641 .syntax = .joined_or_separate,
5642 .zig_equivalent = .other,
5643 .pd1 = true,
5644 .pd2 = false,
5645 .psl = true,
5646},
5647.{
5648 .name = "O",
5649 .syntax = .joined,
5650 .zig_equivalent = .optimize,
5651 .pd1 = true,
5652 .pd2 = false,
5653 .psl = true,
5654},
5655.{
5656 .name = "U",
5657 .syntax = .joined_or_separate,
5658 .zig_equivalent = .other,
5659 .pd1 = true,
5660 .pd2 = false,
5661 .psl = true,
5662},
5663.{
5664 .name = "o",
5665 .syntax = .joined_or_separate,
5666 .zig_equivalent = .o,
5667 .pd1 = true,
5668 .pd2 = false,
5669 .psl = true,
5670},
5671.{
5672 .name = "w",
5673 .syntax = .joined,
5674 .zig_equivalent = .other,
5675 .pd1 = true,
5676 .pd2 = false,
5677 .psl = true,
5678},
5679joinpd1("a"),
5680jspd1("b"),
5681joinpd1("d"),
5682jspd1("e"),
5683.{
5684 .name = "l",
5685 .syntax = .joined_or_separate,
5686 .zig_equivalent = .l,
5687 .pd1 = true,
5688 .pd2 = false,
5689 .psl = false,
5690},
5691.{
5692 .name = "o",
5693 .syntax = .joined_or_separate,
5694 .zig_equivalent = .o,
5695 .pd1 = true,
5696 .pd2 = false,
5697 .psl = false,
5698},
5699jspd1("u"),
5700jspd1("x"),
5701joinpd1("y"),
5702};};
src-self-hosted/stage2.zig+171
......@@ -113,6 +113,7 @@ const Error = extern enum {
113113 TargetHasNoDynamicLinker,
114114 InvalidAbiVersion,
115115 InvalidOperatingSystemVersion,
116 UnknownClangOption,
116117};
117118
118119const FILE = std.c.FILE;
......@@ -1215,3 +1216,173 @@ fn convertSlice(slice: [][:0]u8, ptr: *[*][*:0]u8, len: *usize) !void {
12151216 }
12161217 ptr.* = new_slice.ptr;
12171218}
1219
1220const clang_args = @import("clang_options.zig").list;
1221
1222// ABI warning
1223pub const ClangArgIterator = extern struct {
1224 has_next: bool,
1225 zig_equivalent: ZigEquivalent,
1226 only_arg: [*:0]const u8,
1227 second_arg: [*:0]const u8,
1228 other_args_ptr: [*]const [*:0]const u8,
1229 other_args_len: usize,
1230 argv_ptr: [*]const [*:0]const u8,
1231 argv_len: usize,
1232 next_index: usize,
1233
1234 // ABI warning
1235 pub const ZigEquivalent = extern enum {
1236 target,
1237 o,
1238 c,
1239 other,
1240 positional,
1241 l,
1242 ignore,
1243 driver_punt,
1244 pic,
1245 no_pic,
1246 nostdlib,
1247 shared,
1248 rdynamic,
1249 wl,
1250 preprocess,
1251 optimize,
1252 debug,
1253 sanitize,
1254 };
1255
1256 fn init(argv: []const [*:0]const u8) ClangArgIterator {
1257 return .{
1258 .next_index = 2, // `zig cc foo` this points to `foo`
1259 .has_next = argv.len > 2,
1260 .zig_equivalent = undefined,
1261 .only_arg = undefined,
1262 .second_arg = undefined,
1263 .other_args_ptr = undefined,
1264 .other_args_len = undefined,
1265 .argv_ptr = argv.ptr,
1266 .argv_len = argv.len,
1267 };
1268 }
1269
1270 fn next(self: *ClangArgIterator) !void {
1271 assert(self.has_next);
1272 assert(self.next_index < self.argv_len);
1273 // In this state we know that the parameter we are looking at is a root parameter
1274 // rather than an argument to a parameter.
1275 self.other_args_ptr = self.argv_ptr + self.next_index;
1276 self.other_args_len = 1; // We adjust this value below when necessary.
1277 const arg = mem.span(self.argv_ptr[self.next_index]);
1278 self.next_index += 1;
1279 defer {
1280 if (self.next_index >= self.argv_len) self.has_next = false;
1281 }
1282
1283 if (!mem.startsWith(u8, arg, "-")) {
1284 self.zig_equivalent = .positional;
1285 self.only_arg = arg.ptr;
1286 return;
1287 }
1288
1289 find_clang_arg: for (clang_args) |clang_arg| switch (clang_arg.syntax) {
1290 .flag => {
1291 const prefix_len = clang_arg.matchEql(arg);
1292 if (prefix_len > 0) {
1293 self.zig_equivalent = clang_arg.zig_equivalent;
1294 self.only_arg = arg.ptr + prefix_len;
1295
1296 break :find_clang_arg;
1297 }
1298 },
1299 .joined, .comma_joined => {
1300 // joined example: --target=foo
1301 // comma_joined example: -Wl,-soname,libsoundio.so.2
1302 const prefix_len = clang_arg.matchStartsWith(arg);
1303 if (prefix_len != 0) {
1304 self.zig_equivalent = clang_arg.zig_equivalent;
1305 self.only_arg = arg.ptr + prefix_len; // This will skip over the "--target=" part.
1306
1307 break :find_clang_arg;
1308 }
1309 },
1310 .joined_or_separate => {
1311 // Examples: `-lfoo`, `-l foo`
1312 const prefix_len = clang_arg.matchStartsWith(arg);
1313 if (prefix_len == arg.len) {
1314 if (self.next_index >= self.argv_len) {
1315 std.debug.warn("Expected parameter after '{}'\n", .{arg});
1316 process.exit(1);
1317 }
1318 self.only_arg = self.argv_ptr[self.next_index];
1319 self.next_index += 1;
1320 self.other_args_len += 1;
1321 self.zig_equivalent = clang_arg.zig_equivalent;
1322
1323 break :find_clang_arg;
1324 } else if (prefix_len != 0) {
1325 self.zig_equivalent = clang_arg.zig_equivalent;
1326 self.only_arg = arg.ptr + prefix_len;
1327
1328 break :find_clang_arg;
1329 }
1330 },
1331 .joined_and_separate => {
1332 // Example: `-Xopenmp-target=riscv64-linux-unknown foo`
1333 const prefix_len = clang_arg.matchStartsWith(arg);
1334 if (prefix_len != 0) {
1335 self.only_arg = arg.ptr + prefix_len;
1336 if (self.next_index >= self.argv_len) {
1337 std.debug.warn("Expected parameter after '{}'\n", .{arg});
1338 process.exit(1);
1339 }
1340 self.second_arg = self.argv_ptr[self.next_index];
1341 self.next_index += 1;
1342 self.other_args_len += 1;
1343 self.zig_equivalent = clang_arg.zig_equivalent;
1344 break :find_clang_arg;
1345 }
1346 },
1347 .separate => if (clang_arg.matchEql(arg) > 0) {
1348 if (self.next_index >= self.argv_len) {
1349 std.debug.warn("Expected parameter after '{}'\n", .{arg});
1350 process.exit(1);
1351 }
1352 self.only_arg = self.argv_ptr[self.next_index];
1353 self.next_index += 1;
1354 self.other_args_len += 1;
1355 self.zig_equivalent = clang_arg.zig_equivalent;
1356 break :find_clang_arg;
1357 },
1358 .remaining_args_joined => {
1359 const prefix_len = clang_arg.matchStartsWith(arg);
1360 if (prefix_len != 0) {
1361 @panic("TODO");
1362 }
1363 },
1364 .multi_arg => if (clang_arg.matchEql(arg) > 0) {
1365 @panic("TODO");
1366 },
1367 }
1368 else {
1369 std.debug.warn("Unknown Clang option: '{}'\n", .{arg});
1370 process.exit(1);
1371 }
1372 }
1373};
1374
1375export fn stage2_clang_arg_iterator(
1376 result: *ClangArgIterator,
1377 argc: usize,
1378 argv: [*]const [*:0]const u8,
1379) void {
1380 result.* = ClangArgIterator.init(argv[0..argc]);
1381}
1382
1383export fn stage2_clang_arg_next(it: *ClangArgIterator) Error {
1384 it.next() catch |err| switch (err) {
1385 error.UnknownClangOption => return .UnknownClangOption,
1386 };
1387 return .None;
1388}
src/all_types.hpp+2
......@@ -2003,6 +2003,7 @@ enum WantCSanitize {
20032003struct CFile {
20042004 ZigList<const char *> args;
20052005 const char *source_path;
2006 const char *preprocessor_only_basename;
20062007};
20072008
20082009// When adding fields, check if they should be added to the hash computation in build_with_cache
......@@ -2147,6 +2148,7 @@ struct CodeGen {
21472148 // As an input parameter, mutually exclusive with enable_cache. But it gets
21482149 // populated in codegen_build_and_link.
21492150 Buf *output_dir;
2151 Buf *c_artifact_dir;
21502152 const char **libc_include_dir_list;
21512153 size_t libc_include_dir_len;
21522154
src/codegen.cpp+18-7
......@@ -9269,6 +9269,7 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &args, const char *out_dep_pa
92699269 case BuildModeDebug:
92709270 // windows c runtime requires -D_DEBUG if using debug libraries
92719271 args.append("-D_DEBUG");
9272 args.append("-Og");
92729273
92739274 if (g->libc_link_lib != nullptr) {
92749275 args.append("-fstack-protector-strong");
......@@ -9723,13 +9724,17 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
97239724 buf_len(c_source_basename), 0);
97249725
97259726 Buf *final_o_basename = buf_alloc();
9726 // We special case when doing build-obj for just one C file
9727 if (main_output_dir_is_just_one_c_object_pre(g)) {
9728 buf_init_from_buf(final_o_basename, g->root_out_name);
9727 if (c_file->preprocessor_only_basename == nullptr) {
9728 // We special case when doing build-obj for just one C file
9729 if (main_output_dir_is_just_one_c_object_pre(g)) {
9730 buf_init_from_buf(final_o_basename, g->root_out_name);
9731 } else {
9732 os_path_extname(c_source_basename, final_o_basename, nullptr);
9733 }
9734 buf_append_str(final_o_basename, target_o_file_ext(g->zig_target));
97299735 } else {
9730 os_path_extname(c_source_basename, final_o_basename, nullptr);
9736 buf_init_from_str(final_o_basename, c_file->preprocessor_only_basename);
97319737 }
9732 buf_append_str(final_o_basename, target_o_file_ext(g->zig_target));
97339738
97349739 CacheHash *cache_hash;
97359740 if ((err = create_c_object_cache(g, &cache_hash, true))) {
......@@ -9778,7 +9783,13 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
97789783 Termination term;
97799784 ZigList<const char *> args = {};
97809785 args.append(buf_ptr(self_exe_path));
9781 args.append("cc");
9786 args.append("clang");
9787
9788 if (c_file->preprocessor_only_basename != nullptr) {
9789 args.append("-E");
9790 } else {
9791 args.append("-c");
9792 }
97829793
97839794 Buf *out_dep_path = buf_sprintf("%s.d", buf_ptr(out_obj_path));
97849795 add_cc_args(g, args, buf_ptr(out_dep_path), false);
......@@ -9786,7 +9797,6 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
97869797 args.append("-o");
97879798 args.append(buf_ptr(out_obj_path));
97889799
9789 args.append("-c");
97909800 args.append(buf_ptr(c_source_file));
97919801
97929802 for (size_t arg_i = 0; arg_i < c_file->args.length; arg_i += 1) {
......@@ -9841,6 +9851,7 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
98419851 os_path_join(artifact_dir, final_o_basename, o_final_path);
98429852 }
98439853
9854 g->c_artifact_dir = artifact_dir;
98449855 g->link_objects.append(o_final_path);
98459856 g->caches_to_release.append(cache_hash);
98469857
src/error.cpp+1
......@@ -83,6 +83,7 @@ const char *err_str(Error err) {
8383 case ErrorTargetHasNoDynamicLinker: return "target has no dynamic linker";
8484 case ErrorInvalidAbiVersion: return "invalid C ABI version";
8585 case ErrorInvalidOperatingSystemVersion: return "invalid operating system version";
86 case ErrorUnknownClangOption: return "unknown Clang option";
8687 }
8788 return "(invalid error)";
8889}
src/link.cpp+1-1
......@@ -2008,7 +2008,7 @@ static const char *get_def_lib(CodeGen *parent, const char *name, Buf *def_in_fi
20082008
20092009 ZigList<const char *> args = {};
20102010 args.append(buf_ptr(self_exe_path));
2011 args.append("cc");
2011 args.append("clang");
20122012 args.append("-x");
20132013 args.append("c");
20142014 args.append(buf_ptr(def_in_file));
src/main.cpp+279-5
......@@ -36,7 +36,7 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
3636 " build-lib [source] create library from source or object files\n"
3737 " build-obj [source] create object from source or assembly\n"
3838 " builtin show the source code of @import(\"builtin\")\n"
39 " cc C compiler\n"
39 " cc use Zig as a drop-in C compiler\n"
4040 " fmt parse files and render in canonical zig format\n"
4141 " id print the base64-encoded compiler id\n"
4242 " init-exe initialize a `zig build` application in the cwd\n"
......@@ -271,7 +271,7 @@ static int main0(int argc, char **argv) {
271271 return 0;
272272 }
273273
274 if (argc >= 2 && (strcmp(argv[1], "cc") == 0 ||
274 if (argc >= 2 && (strcmp(argv[1], "clang") == 0 ||
275275 strcmp(argv[1], "-cc1") == 0 || strcmp(argv[1], "-cc1as") == 0))
276276 {
277277 return ZigClang_main(argc, argv);
......@@ -430,6 +430,7 @@ static int main0(int argc, char **argv) {
430430 bool enable_dump_analysis = false;
431431 bool enable_doc_generation = false;
432432 bool emit_bin = true;
433 const char *emit_bin_override_path = nullptr;
433434 bool emit_asm = false;
434435 bool emit_llvm_ir = false;
435436 bool emit_h = false;
......@@ -451,6 +452,8 @@ static int main0(int argc, char **argv) {
451452 bool function_sections = false;
452453 const char *mcpu = nullptr;
453454 CodeModel code_model = CodeModelDefault;
455 const char *override_soname = nullptr;
456 bool only_preprocess = false;
454457
455458 ZigList<const char *> llvm_argv = {0};
456459 llvm_argv.append("zig (LLVM option parsing)");
......@@ -575,9 +578,228 @@ static int main0(int argc, char **argv) {
575578 return (term.how == TerminationIdClean) ? term.code : -1;
576579 } else if (argc >= 2 && strcmp(argv[1], "fmt") == 0) {
577580 return stage2_fmt(argc, argv);
578 }
581 } else if (argc >= 2 && strcmp(argv[1], "cc") == 0) {
582 emit_h = false;
583 strip = true;
584
585 bool c_arg = false;
586 Stage2ClangArgIterator it;
587 stage2_clang_arg_iterator(&it, argc, argv);
588 bool nostdlib = false;
589 bool is_shared_lib = false;
590 ZigList<Buf *> linker_args = {};
591 while (it.has_next) {
592 if ((err = stage2_clang_arg_next(&it))) {
593 fprintf(stderr, "unable to parse command line parameters: %s\n", err_str(err));
594 return EXIT_FAILURE;
595 }
596 switch (it.kind) {
597 case Stage2ClangArgTarget: // example: -target riscv64-linux-unknown
598 target_string = it.only_arg;
599 break;
600 case Stage2ClangArgO: // -o
601 emit_bin_override_path = it.only_arg;
602 enable_cache = CacheOptOn;
603 break;
604 case Stage2ClangArgC: // -c
605 c_arg = true;
606 break;
607 case Stage2ClangArgOther:
608 for (size_t i = 0; i < it.other_args_len; i += 1) {
609 clang_argv.append(it.other_args_ptr[i]);
610 }
611 break;
612 case Stage2ClangArgPositional: {
613 Buf *arg_buf = buf_create_from_str(it.only_arg);
614 if (buf_ends_with_str(arg_buf, ".c") ||
615 buf_ends_with_str(arg_buf, ".cc") ||
616 buf_ends_with_str(arg_buf, ".cpp") ||
617 buf_ends_with_str(arg_buf, ".cxx") ||
618 buf_ends_with_str(arg_buf, ".s"))
619 {
620 CFile *c_file = heap::c_allocator.create<CFile>();
621 c_file->source_path = it.only_arg;
622 c_source_files.append(c_file);
623 } else {
624 objects.append(it.only_arg);
625 }
626 break;
627 }
628 case Stage2ClangArgL: // -l
629 if (strcmp(it.only_arg, "c") == 0)
630 have_libc = true;
631 link_libs.append(it.only_arg);
632 break;
633 case Stage2ClangArgIgnore:
634 break;
635 case Stage2ClangArgDriverPunt:
636 // Never mind what we're doing, just pass the args directly. For example --help.
637 return ZigClang_main(argc, argv);
638 case Stage2ClangArgPIC:
639 want_pic = WantPICEnabled;
640 break;
641 case Stage2ClangArgNoPIC:
642 want_pic = WantPICDisabled;
643 break;
644 case Stage2ClangArgNoStdLib:
645 nostdlib = true;
646 break;
647 case Stage2ClangArgShared:
648 is_dynamic = true;
649 is_shared_lib = true;
650 break;
651 case Stage2ClangArgRDynamic:
652 rdynamic = true;
653 break;
654 case Stage2ClangArgWL: {
655 const char *arg = it.only_arg;
656 for (;;) {
657 size_t pos = 0;
658 while (arg[pos] != ',' && arg[pos] != 0) pos += 1;
659 linker_args.append(buf_create_from_mem(arg, pos));
660 if (arg[pos] == 0) break;
661 arg += pos + 1;
662 }
663 break;
664 }
665 case Stage2ClangArgPreprocess:
666 only_preprocess = true;
667 break;
668 case Stage2ClangArgOptimize:
669 // alright what release mode do they want?
670 if (strcmp(it.only_arg, "Os") == 0) {
671 build_mode = BuildModeSmallRelease;
672 } else if (strcmp(it.only_arg, "O2") == 0 ||
673 strcmp(it.only_arg, "O3") == 0 ||
674 strcmp(it.only_arg, "O4") == 0)
675 {
676 build_mode = BuildModeFastRelease;
677 } else if (strcmp(it.only_arg, "Og") == 0) {
678 build_mode = BuildModeDebug;
679 } else {
680 for (size_t i = 0; i < it.other_args_len; i += 1) {
681 clang_argv.append(it.other_args_ptr[i]);
682 }
683 }
684 break;
685 case Stage2ClangArgDebug:
686 strip = false;
687 if (strcmp(it.only_arg, "-g") == 0) {
688 // we handled with strip = false above
689 } else {
690 for (size_t i = 0; i < it.other_args_len; i += 1) {
691 clang_argv.append(it.other_args_ptr[i]);
692 }
693 }
694 break;
695 case Stage2ClangArgSanitize:
696 if (strcmp(it.only_arg, "undefined") == 0) {
697 want_sanitize_c = WantCSanitizeEnabled;
698 } else {
699 for (size_t i = 0; i < it.other_args_len; i += 1) {
700 clang_argv.append(it.other_args_ptr[i]);
701 }
702 }
703 break;
704 }
705 }
706 // Parse linker args
707 for (size_t i = 0; i < linker_args.length; i += 1) {
708 Buf *arg = linker_args.at(i);
709 if (buf_eql_str(arg, "-soname")) {
710 i += 1;
711 if (i >= linker_args.length) {
712 fprintf(stderr, "expected linker arg after '%s'\n", buf_ptr(arg));
713 return EXIT_FAILURE;
714 }
715 Buf *soname_buf = linker_args.at(i);
716 override_soname = buf_ptr(soname_buf);
717 // use it as --name
718 // example: libsoundio.so.2
719 size_t prefix = 0;
720 if (buf_starts_with_str(soname_buf, "lib")) {
721 prefix = 3;
722 }
723 size_t end = buf_len(soname_buf);
724 if (buf_ends_with_str(soname_buf, ".so")) {
725 end -= 3;
726 } else {
727 bool found_digit = false;
728 while (end > 0 && isdigit(buf_ptr(soname_buf)[end - 1])) {
729 found_digit = true;
730 end -= 1;
731 }
732 if (found_digit && end > 0 && buf_ptr(soname_buf)[end - 1] == '.') {
733 end -= 1;
734 } else {
735 end = buf_len(soname_buf);
736 }
737 if (buf_ends_with_str(buf_slice(soname_buf, prefix, end), ".so")) {
738 end -= 3;
739 }
740 }
741 out_name = buf_ptr(buf_slice(soname_buf, prefix, end));
742 } else if (buf_eql_str(arg, "-rpath")) {
743 i += 1;
744 if (i >= linker_args.length) {
745 fprintf(stderr, "expected linker arg after '%s'\n", buf_ptr(arg));
746 return EXIT_FAILURE;
747 }
748 Buf *rpath = linker_args.at(i);
749 rpath_list.append(buf_ptr(rpath));
750 } else {
751 fprintf(stderr, "warning: unsupported linker arg: %s\n", buf_ptr(arg));
752 }
753 }
754
755 if (want_sanitize_c == WantCSanitizeEnabled && build_mode == BuildModeFastRelease) {
756 build_mode = BuildModeSafeRelease;
757 }
579758
580 for (int i = 1; i < argc; i += 1) {
759 if (!nostdlib && !have_libc) {
760 have_libc = true;
761 link_libs.append("c");
762 }
763 if (only_preprocess) {
764 cmd = CmdBuild;
765 out_type = OutTypeObj;
766 emit_bin = false;
767 // Transfer "objects" into c_source_files
768 for (size_t i = 0; i < objects.length; i += 1) {
769 CFile *c_file = heap::c_allocator.create<CFile>();
770 c_file->source_path = objects.at(i);
771 c_source_files.append(c_file);
772 }
773 for (size_t i = 0; i < c_source_files.length; i += 1) {
774 Buf *src_path;
775 if (emit_bin_override_path != nullptr) {
776 src_path = buf_create_from_str(emit_bin_override_path);
777 } else {
778 src_path = buf_create_from_str(c_source_files.at(i)->source_path);
779 }
780 Buf basename = BUF_INIT;
781 os_path_split(src_path, nullptr, &basename);
782 c_source_files.at(i)->preprocessor_only_basename = buf_ptr(&basename);
783 }
784 } else if (!c_arg) {
785 cmd = CmdBuild;
786 if (is_shared_lib) {
787 out_type = OutTypeLib;
788 } else {
789 out_type = OutTypeExe;
790 }
791 if (emit_bin_override_path == nullptr) {
792 emit_bin_override_path = "a.out";
793 }
794 } else {
795 cmd = CmdBuild;
796 out_type = OutTypeObj;
797 }
798 if (c_source_files.length == 0 && objects.length == 0) {
799 // For example `zig cc` and no args should print the "no input files" message.
800 return ZigClang_main(argc, argv);
801 }
802 } else for (int i = 1; i < argc; i += 1) {
581803 char *arg = argv[i];
582804
583805 if (arg[0] == '-') {
......@@ -1138,6 +1360,18 @@ static int main0(int argc, char **argv) {
11381360 buf_out_name = buf_alloc();
11391361 os_path_extname(&basename, buf_out_name, nullptr);
11401362 }
1363 if (need_name && buf_out_name == nullptr && objects.length == 1) {
1364 Buf basename = BUF_INIT;
1365 os_path_split(buf_create_from_str(objects.at(0)), nullptr, &basename);
1366 buf_out_name = buf_alloc();
1367 os_path_extname(&basename, buf_out_name, nullptr);
1368 }
1369 if (need_name && buf_out_name == nullptr && emit_bin_override_path != nullptr) {
1370 Buf basename = BUF_INIT;
1371 os_path_split(buf_create_from_str(emit_bin_override_path), nullptr, &basename);
1372 buf_out_name = buf_alloc();
1373 os_path_extname(&basename, buf_out_name, nullptr);
1374 }
11411375
11421376 if (need_name && buf_out_name == nullptr) {
11431377 fprintf(stderr, "--name [name] not provided and unable to infer\n\n");
......@@ -1213,6 +1447,10 @@ static int main0(int argc, char **argv) {
12131447 g->function_sections = function_sections;
12141448 g->code_model = code_model;
12151449
1450 if (override_soname) {
1451 g->override_soname = buf_create_from_str(override_soname);
1452 }
1453
12161454 for (size_t i = 0; i < lib_dirs.length; i += 1) {
12171455 codegen_add_lib_dir(g, lib_dirs.at(i));
12181456 }
......@@ -1291,7 +1529,43 @@ static int main0(int argc, char **argv) {
12911529 os_spawn_process(args, &term);
12921530 return term.code;
12931531 } else if (cmd == CmdBuild) {
1294 if (g->enable_cache) {
1532 if (emit_bin_override_path != nullptr) {
1533#if defined(ZIG_OS_WINDOWS)
1534 buf_replace(g->output_dir, '/', '\\');
1535#endif
1536 Buf *dest_path = buf_create_from_str(emit_bin_override_path);
1537 Buf *source_path;
1538 if (only_preprocess) {
1539 source_path = buf_alloc();
1540 Buf *pp_only_basename = buf_create_from_str(
1541 c_source_files.at(0)->preprocessor_only_basename);
1542 os_path_join(g->output_dir, pp_only_basename, source_path);
1543
1544 } else {
1545 source_path = &g->bin_file_output_path;
1546 }
1547 if ((err = os_update_file(source_path, dest_path))) {
1548 fprintf(stderr, "unable to copy %s to %s: %s\n", buf_ptr(source_path),
1549 buf_ptr(dest_path), err_str(err));
1550 return main_exit(root_progress_node, EXIT_FAILURE);
1551 }
1552 } else if (only_preprocess) {
1553#if defined(ZIG_OS_WINDOWS)
1554 buf_replace(g->c_artifact_dir, '/', '\\');
1555#endif
1556 // dump the preprocessed output to stdout
1557 for (size_t i = 0; i < c_source_files.length; i += 1) {
1558 Buf *source_path = buf_alloc();
1559 Buf *pp_only_basename = buf_create_from_str(
1560 c_source_files.at(i)->preprocessor_only_basename);
1561 os_path_join(g->c_artifact_dir, pp_only_basename, source_path);
1562 if ((err = os_dump_file(source_path, stdout))) {
1563 fprintf(stderr, "unable to read %s: %s\n", buf_ptr(source_path),
1564 err_str(err));
1565 return main_exit(root_progress_node, EXIT_FAILURE);
1566 }
1567 }
1568 } else if (g->enable_cache) {
12951569#if defined(ZIG_OS_WINDOWS)
12961570 buf_replace(&g->bin_file_output_path, '/', '\\');
12971571 buf_replace(g->output_dir, '/', '\\');
src/os.cpp+24
......@@ -1051,6 +1051,30 @@ static Error copy_open_files(FILE *src_f, FILE *dest_f) {
10511051 }
10521052}
10531053
1054Error os_dump_file(Buf *src_path, FILE *dest_file) {
1055 Error err;
1056
1057 FILE *src_f = fopen(buf_ptr(src_path), "rb");
1058 if (!src_f) {
1059 int err = errno;
1060 if (err == ENOENT) {
1061 return ErrorFileNotFound;
1062 } else if (err == EACCES || err == EPERM) {
1063 return ErrorAccess;
1064 } else {
1065 return ErrorFileSystem;
1066 }
1067 }
1068 copy_open_files(src_f, dest_file);
1069 if ((err = copy_open_files(src_f, dest_file))) {
1070 fclose(src_f);
1071 return err;
1072 }
1073
1074 fclose(src_f);
1075 return ErrorNone;
1076}
1077
10541078#if defined(ZIG_OS_WINDOWS)
10551079static void windows_filetime_to_os_timestamp(FILETIME *ft, OsTimeStamp *mtime) {
10561080 mtime->sec = (((ULONGLONG) ft->dwHighDateTime) << 32) + ft->dwLowDateTime;
src/os.hpp+1
......@@ -129,6 +129,7 @@ void os_file_close(OsFile *file);
129129Error ATTRIBUTE_MUST_USE os_write_file(Buf *full_path, Buf *contents);
130130Error ATTRIBUTE_MUST_USE os_copy_file(Buf *src_path, Buf *dest_path);
131131Error ATTRIBUTE_MUST_USE os_update_file(Buf *src_path, Buf *dest_path);
132Error ATTRIBUTE_MUST_USE os_dump_file(Buf *src_path, FILE *dest_file);
132133
133134Error ATTRIBUTE_MUST_USE os_fetch_file(FILE *file, Buf *out_contents);
134135Error ATTRIBUTE_MUST_USE os_fetch_file_path(Buf *full_path, Buf *out_contents);
src/stage2.cpp+12
......@@ -304,3 +304,15 @@ enum Error stage2_detect_native_paths(struct Stage2NativePaths *native_paths) {
304304
305305 return ErrorNone;
306306}
307
308void stage2_clang_arg_iterator(struct Stage2ClangArgIterator *it,
309 size_t argc, char **argv)
310{
311 const char *msg = "stage0 called stage2_clang_arg_iterator";
312 stage2_panic(msg, strlen(msg));
313}
314
315enum Error stage2_clang_arg_next(struct Stage2ClangArgIterator *it) {
316 const char *msg = "stage0 called stage2_clang_arg_next";
317 stage2_panic(msg, strlen(msg));
318}
src/stage2.h+43
......@@ -105,6 +105,7 @@ enum Error {
105105 ErrorTargetHasNoDynamicLinker,
106106 ErrorInvalidAbiVersion,
107107 ErrorInvalidOperatingSystemVersion,
108 ErrorUnknownClangOption,
108109};
109110
110111// ABI warning
......@@ -316,4 +317,46 @@ struct Stage2NativePaths {
316317// ABI warning
317318ZIG_EXTERN_C enum Error stage2_detect_native_paths(struct Stage2NativePaths *native_paths);
318319
320// ABI warning
321enum Stage2ClangArg {
322 Stage2ClangArgTarget,
323 Stage2ClangArgO,
324 Stage2ClangArgC,
325 Stage2ClangArgOther,
326 Stage2ClangArgPositional,
327 Stage2ClangArgL,
328 Stage2ClangArgIgnore,
329 Stage2ClangArgDriverPunt,
330 Stage2ClangArgPIC,
331 Stage2ClangArgNoPIC,
332 Stage2ClangArgNoStdLib,
333 Stage2ClangArgShared,
334 Stage2ClangArgRDynamic,
335 Stage2ClangArgWL,
336 Stage2ClangArgPreprocess,
337 Stage2ClangArgOptimize,
338 Stage2ClangArgDebug,
339 Stage2ClangArgSanitize,
340};
341
342// ABI warning
343struct Stage2ClangArgIterator {
344 bool has_next;
345 enum Stage2ClangArg kind;
346 const char *only_arg;
347 const char *second_arg;
348 const char **other_args_ptr;
349 size_t other_args_len;
350 const char **argv_ptr;
351 size_t argv_len;
352 size_t next_index;
353};
354
355// ABI warning
356ZIG_EXTERN_C void stage2_clang_arg_iterator(struct Stage2ClangArgIterator *it,
357 size_t argc, char **argv);
358
359// ABI warning
360ZIG_EXTERN_C enum Error stage2_clang_arg_next(struct Stage2ClangArgIterator *it);
361
319362#endif
tools/process_headers.zig+11-11
......@@ -1,14 +1,14 @@
1// To get started, run this tool with no args and read the help message.
2//
3// The build systems of musl-libc and glibc require specifying a single target
4// architecture. Meanwhile, Zig supports out-of-the-box cross compilation for
5// every target. So the process to create libc headers that Zig ships is to use
6// this tool.
7// First, use the musl/glibc build systems to create installations of all the
8// targets in the `glibc_targets`/`musl_targets` variables.
9// Next, run this tool to create a new directory which puts .h files into
10// <arch> subdirectories, with `generic` being files that apply to all architectures.
11// You'll then have to manually update Zig source repo with these new files.
1//! To get started, run this tool with no args and read the help message.
2//!
3//! The build systems of musl-libc and glibc require specifying a single target
4//! architecture. Meanwhile, Zig supports out-of-the-box cross compilation for
5//! every target. So the process to create libc headers that Zig ships is to use
6//! this tool.
7//! First, use the musl/glibc build systems to create installations of all the
8//! targets in the `glibc_targets`/`musl_targets` variables.
9//! Next, run this tool to create a new directory which puts .h files into
10//! <arch> subdirectories, with `generic` being files that apply to all architectures.
11//! You'll then have to manually update Zig source repo with these new files.
1212
1313const std = @import("std");
1414const Arch = std.Target.Cpu.Arch;
tools/update_clang_options.zig created+460
......@@ -0,0 +1,460 @@
1//! To get started, run this tool with no args and read the help message.
2//!
3//! Clang has a file "options.td" which describes all of its command line parameter options.
4//! When using `zig cc`, Zig acts as a proxy between the user and Clang. It does not need
5//! to understand all the parameters, but it does need to understand some of them, such as
6//! the target. This means that Zig must understand when a C command line parameter expects
7//! to "consume" the next parameter on the command line.
8//!
9//! For example, `-z -target` would mean to pass `-target` to the linker, whereas `-E -target`
10//! would mean that the next parameter specifies the target.
11
12const std = @import("std");
13const fs = std.fs;
14const assert = std.debug.assert;
15const json = std.json;
16
17const KnownOpt = struct {
18 name: []const u8,
19
20 /// Corresponds to stage.zig ClangArgIterator.Kind
21 ident: []const u8,
22};
23
24const known_options = [_]KnownOpt{
25 .{
26 .name = "target",
27 .ident = "target",
28 },
29 .{
30 .name = "o",
31 .ident = "o",
32 },
33 .{
34 .name = "c",
35 .ident = "c",
36 },
37 .{
38 .name = "l",
39 .ident = "l",
40 },
41 .{
42 .name = "pipe",
43 .ident = "ignore",
44 },
45 .{
46 .name = "help",
47 .ident = "driver_punt",
48 },
49 .{
50 .name = "fPIC",
51 .ident = "pic",
52 },
53 .{
54 .name = "fno-PIC",
55 .ident = "no_pic",
56 },
57 .{
58 .name = "nostdlib",
59 .ident = "nostdlib",
60 },
61 .{
62 .name = "no-standard-libraries",
63 .ident = "nostdlib",
64 },
65 .{
66 .name = "shared",
67 .ident = "shared",
68 },
69 .{
70 .name = "rdynamic",
71 .ident = "rdynamic",
72 },
73 .{
74 .name = "Wl,",
75 .ident = "wl",
76 },
77 .{
78 .name = "E",
79 .ident = "preprocess",
80 },
81 .{
82 .name = "preprocess",
83 .ident = "preprocess",
84 },
85 .{
86 .name = "S",
87 .ident = "driver_punt",
88 },
89 .{
90 .name = "assemble",
91 .ident = "driver_punt",
92 },
93 .{
94 .name = "O1",
95 .ident = "optimize",
96 },
97 .{
98 .name = "O2",
99 .ident = "optimize",
100 },
101 .{
102 .name = "Og",
103 .ident = "optimize",
104 },
105 .{
106 .name = "O",
107 .ident = "optimize",
108 },
109 .{
110 .name = "Ofast",
111 .ident = "optimize",
112 },
113 .{
114 .name = "optimize",
115 .ident = "optimize",
116 },
117 .{
118 .name = "g",
119 .ident = "debug",
120 },
121 .{
122 .name = "debug",
123 .ident = "debug",
124 },
125 .{
126 .name = "g-dwarf",
127 .ident = "debug",
128 },
129 .{
130 .name = "g-dwarf-2",
131 .ident = "debug",
132 },
133 .{
134 .name = "g-dwarf-3",
135 .ident = "debug",
136 },
137 .{
138 .name = "g-dwarf-4",
139 .ident = "debug",
140 },
141 .{
142 .name = "g-dwarf-5",
143 .ident = "debug",
144 },
145 .{
146 .name = "fsanitize",
147 .ident = "sanitize",
148 },
149};
150
151const blacklisted_options = [_][]const u8{};
152
153fn knownOption(name: []const u8) ?[]const u8 {
154 const chopped_name = if (std.mem.endsWith(u8, name, "=")) name[0 .. name.len - 1] else name;
155 for (known_options) |item| {
156 if (std.mem.eql(u8, chopped_name, item.name)) {
157 return item.ident;
158 }
159 }
160 return null;
161}
162
163pub fn main() anyerror!void {
164 var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
165 defer arena.deinit();
166
167 const allocator = &arena.allocator;
168 const args = try std.process.argsAlloc(allocator);
169
170 if (args.len <= 1) {
171 usageAndExit(std.io.getStdErr(), args[0], 1);
172 }
173 if (std.mem.eql(u8, args[1], "--help")) {
174 usageAndExit(std.io.getStdOut(), args[0], 0);
175 }
176 if (args.len < 3) {
177 usageAndExit(std.io.getStdErr(), args[0], 1);
178 }
179
180 const llvm_tblgen_exe = args[1];
181 if (std.mem.startsWith(u8, llvm_tblgen_exe, "-")) {
182 usageAndExit(std.io.getStdErr(), args[0], 1);
183 }
184
185 const llvm_src_root = args[2];
186 if (std.mem.startsWith(u8, llvm_src_root, "-")) {
187 usageAndExit(std.io.getStdErr(), args[0], 1);
188 }
189
190 const child_args = [_][]const u8{
191 llvm_tblgen_exe,
192 "--dump-json",
193 try std.fmt.allocPrint(allocator, "{}/clang/include/clang/Driver/Options.td", .{llvm_src_root}),
194 try std.fmt.allocPrint(allocator, "-I={}/llvm/include", .{llvm_src_root}),
195 try std.fmt.allocPrint(allocator, "-I={}/clang/include/clang/Driver", .{llvm_src_root}),
196 };
197
198 const child_result = try std.ChildProcess.exec2(.{
199 .allocator = allocator,
200 .argv = &child_args,
201 .max_output_bytes = 100 * 1024 * 1024,
202 });
203
204 std.debug.warn("{}\n", .{child_result.stderr});
205
206 const json_text = switch (child_result.term) {
207 .Exited => |code| if (code == 0) child_result.stdout else {
208 std.debug.warn("llvm-tblgen exited with code {}\n", .{code});
209 std.process.exit(1);
210 },
211 else => {
212 std.debug.warn("llvm-tblgen crashed\n", .{});
213 std.process.exit(1);
214 },
215 };
216
217 var parser = json.Parser.init(allocator, false);
218 const tree = try parser.parse(json_text);
219 const root_map = &tree.root.Object;
220
221 var all_objects = std.ArrayList(*json.ObjectMap).init(allocator);
222 {
223 var it = root_map.iterator();
224 it_map: while (it.next()) |kv| {
225 if (kv.key.len == 0) continue;
226 if (kv.key[0] == '!') continue;
227 if (kv.value != .Object) continue;
228 if (!kv.value.Object.contains("NumArgs")) continue;
229 if (!kv.value.Object.contains("Name")) continue;
230 for (blacklisted_options) |blacklisted_key| {
231 if (std.mem.eql(u8, blacklisted_key, kv.key)) continue :it_map;
232 }
233 if (kv.value.Object.get("Name").?.value.String.len == 0) continue;
234 try all_objects.append(&kv.value.Object);
235 }
236 }
237 // Some options have multiple matches. As an example, "-Wl,foo" matches both
238 // "W" and "Wl,". So we sort this list in order of descending priority.
239 std.sort.sort(*json.ObjectMap, all_objects.span(), objectLessThan);
240
241 var stdout_bos = std.io.bufferedOutStream(std.io.getStdOut().outStream());
242 const stdout = stdout_bos.outStream();
243 try stdout.writeAll(
244 \\// This file is generated by tools/update_clang_options.zig.
245 \\// zig fmt: off
246 \\usingnamespace @import("clang_options.zig");
247 \\pub const data = blk: { @setEvalBranchQuota(6000); break :blk &[_]CliArg{
248 \\
249 );
250
251 for (all_objects.span()) |obj| {
252 const name = obj.get("Name").?.value.String;
253 var pd1 = false;
254 var pd2 = false;
255 var pslash = false;
256 for (obj.get("Prefixes").?.value.Array.span()) |prefix_json| {
257 const prefix = prefix_json.String;
258 if (std.mem.eql(u8, prefix, "-")) {
259 pd1 = true;
260 } else if (std.mem.eql(u8, prefix, "--")) {
261 pd2 = true;
262 } else if (std.mem.eql(u8, prefix, "/")) {
263 pslash = true;
264 } else {
265 std.debug.warn("{} has unrecognized prefix '{}'\n", .{ name, prefix });
266 std.process.exit(1);
267 }
268 }
269 const syntax = objSyntax(obj);
270
271 if (knownOption(name)) |ident| {
272 try stdout.print(
273 \\.{{
274 \\ .name = "{}",
275 \\ .syntax = {},
276 \\ .zig_equivalent = .{},
277 \\ .pd1 = {},
278 \\ .pd2 = {},
279 \\ .psl = {},
280 \\}},
281 \\
282 , .{ name, syntax, ident, pd1, pd2, pslash });
283 } else if (pd1 and !pd2 and !pslash and syntax == .flag) {
284 try stdout.print("flagpd1(\"{}\"),\n", .{name});
285 } else if (pd1 and !pd2 and !pslash and syntax == .joined) {
286 try stdout.print("joinpd1(\"{}\"),\n", .{name});
287 } else if (pd1 and !pd2 and !pslash and syntax == .joined_or_separate) {
288 try stdout.print("jspd1(\"{}\"),\n", .{name});
289 } else if (pd1 and !pd2 and !pslash and syntax == .separate) {
290 try stdout.print("sepd1(\"{}\"),\n", .{name});
291 } else {
292 try stdout.print(
293 \\.{{
294 \\ .name = "{}",
295 \\ .syntax = {},
296 \\ .zig_equivalent = .other,
297 \\ .pd1 = {},
298 \\ .pd2 = {},
299 \\ .psl = {},
300 \\}},
301 \\
302 , .{ name, syntax, pd1, pd2, pslash });
303 }
304 }
305
306 try stdout.writeAll(
307 \\};};
308 \\
309 );
310
311 try stdout_bos.flush();
312}
313
314// TODO we should be able to import clang_options.zig but currently this is problematic because it will
315// import stage2.zig and that causes a bunch of stuff to get exported
316const Syntax = union(enum) {
317 /// A flag with no values.
318 flag,
319
320 /// An option which prefixes its (single) value.
321 joined,
322
323 /// An option which is followed by its value.
324 separate,
325
326 /// An option which is either joined to its (non-empty) value, or followed by its value.
327 joined_or_separate,
328
329 /// An option which is both joined to its (first) value, and followed by its (second) value.
330 joined_and_separate,
331
332 /// An option followed by its values, which are separated by commas.
333 comma_joined,
334
335 /// An option which consumes an optional joined argument and any other remaining arguments.
336 remaining_args_joined,
337
338 /// An option which is which takes multiple (separate) arguments.
339 multi_arg: u8,
340
341 pub fn format(
342 self: Syntax,
343 comptime fmt: []const u8,
344 options: std.fmt.FormatOptions,
345 out_stream: var,
346 ) !void {
347 switch (self) {
348 .multi_arg => |n| return out_stream.print(".{{.{}={}}}", .{ @tagName(self), n }),
349 else => return out_stream.print(".{}", .{@tagName(self)}),
350 }
351 }
352};
353
354fn objSyntax(obj: *json.ObjectMap) Syntax {
355 const num_args = @intCast(u8, obj.get("NumArgs").?.value.Integer);
356 for (obj.get("!superclasses").?.value.Array.span()) |superclass_json| {
357 const superclass = superclass_json.String;
358 if (std.mem.eql(u8, superclass, "Joined")) {
359 return .joined;
360 } else if (std.mem.eql(u8, superclass, "CLJoined")) {
361 return .joined;
362 } else if (std.mem.eql(u8, superclass, "CLIgnoredJoined")) {
363 return .joined;
364 } else if (std.mem.eql(u8, superclass, "CLCompileJoined")) {
365 return .joined;
366 } else if (std.mem.eql(u8, superclass, "JoinedOrSeparate")) {
367 return .joined_or_separate;
368 } else if (std.mem.eql(u8, superclass, "CLJoinedOrSeparate")) {
369 return .joined_or_separate;
370 } else if (std.mem.eql(u8, superclass, "CLCompileJoinedOrSeparate")) {
371 return .joined_or_separate;
372 } else if (std.mem.eql(u8, superclass, "Flag")) {
373 return .flag;
374 } else if (std.mem.eql(u8, superclass, "CLFlag")) {
375 return .flag;
376 } else if (std.mem.eql(u8, superclass, "CLIgnoredFlag")) {
377 return .flag;
378 } else if (std.mem.eql(u8, superclass, "Separate")) {
379 return .separate;
380 } else if (std.mem.eql(u8, superclass, "JoinedAndSeparate")) {
381 return .joined_and_separate;
382 } else if (std.mem.eql(u8, superclass, "CommaJoined")) {
383 return .comma_joined;
384 } else if (std.mem.eql(u8, superclass, "CLRemainingArgsJoined")) {
385 return .remaining_args_joined;
386 } else if (std.mem.eql(u8, superclass, "MultiArg")) {
387 return .{ .multi_arg = num_args };
388 }
389 }
390 const name = obj.get("Name").?.value.String;
391 if (std.mem.eql(u8, name, "<input>")) {
392 return .flag;
393 } else if (std.mem.eql(u8, name, "<unknown>")) {
394 return .flag;
395 }
396 const kind_def = obj.get("Kind").?.value.Object.get("def").?.value.String;
397 if (std.mem.eql(u8, kind_def, "KIND_FLAG")) {
398 return .flag;
399 }
400 const key = obj.get("!name").?.value.String;
401 std.debug.warn("{} (key {}) has unrecognized superclasses:\n", .{ name, key });
402 for (obj.get("!superclasses").?.value.Array.span()) |superclass_json| {
403 std.debug.warn(" {}\n", .{superclass_json.String});
404 }
405 std.process.exit(1);
406}
407
408fn syntaxMatchesWithEql(syntax: Syntax) bool {
409 return switch (syntax) {
410 .flag,
411 .separate,
412 .multi_arg,
413 => true,
414
415 .joined,
416 .joined_or_separate,
417 .joined_and_separate,
418 .comma_joined,
419 .remaining_args_joined,
420 => false,
421 };
422}
423
424fn objectLessThan(a: *json.ObjectMap, b: *json.ObjectMap) bool {
425 // Priority is determined by exact matches first, followed by prefix matches in descending
426 // length, with key as a final tiebreaker.
427 const a_syntax = objSyntax(a);
428 const b_syntax = objSyntax(b);
429
430 const a_match_with_eql = syntaxMatchesWithEql(a_syntax);
431 const b_match_with_eql = syntaxMatchesWithEql(b_syntax);
432
433 if (a_match_with_eql and !b_match_with_eql) {
434 return true;
435 } else if (!a_match_with_eql and b_match_with_eql) {
436 return false;
437 }
438
439 if (!a_match_with_eql and !b_match_with_eql) {
440 const a_name = a.get("Name").?.value.String;
441 const b_name = b.get("Name").?.value.String;
442 if (a_name.len != b_name.len) {
443 return a_name.len > b_name.len;
444 }
445 }
446
447 const a_key = a.get("!name").?.value.String;
448 const b_key = b.get("!name").?.value.String;
449 return std.mem.lessThan(u8, a_key, b_key);
450}
451
452fn usageAndExit(file: fs.File, arg0: []const u8, code: u8) noreturn {
453 file.outStream().print(
454 \\Usage: {} /path/to/llvm-tblgen /path/to/git/llvm/llvm-project
455 \\
456 \\Prints to stdout Zig code which you can use to replace the file src-self-hosted/clang_options_data.zig.
457 \\
458 , .{arg0}) catch std.process.exit(1);
459 std.process.exit(code);
460}