| author | |
| committer | |
| log | 3afc4dff302a85e2f13e0e43a2258d1b16dd4730 |
| tree | bcbcbe379d55ccdaa87ec50c15a0d1afcf81bcdd |
| parent | 50b36e84fab023ec418eb794d6a5b4510ac6b984 |
| parent | a0ec07fdec9efb8364394ad12b4000a9072ed59f |
| signature |
cc: add support for -M flag3 files changed, 26 insertions(+), 14 deletions(-)
src/clang_options_data.zig+10-3| ... | ... | @@ -33,7 +33,14 @@ flagpd1("H"), |
| 33 | 33 | .psl = false, |
| 34 | 34 | }, |
| 35 | 35 | flagpd1("I-"), |
| 36 | flagpd1("M"), | |
| 36 | .{ | |
| 37 | .name = "M", | |
| 38 | .syntax = .flag, | |
| 39 | .zig_equivalent = .dep_file_to_stdout, | |
| 40 | .pd1 = true, | |
| 41 | .pd2 = false, | |
| 42 | .psl = false, | |
| 43 | }, | |
| 37 | 44 | .{ |
| 38 | 45 | .name = "MD", |
| 39 | 46 | .syntax = .flag, |
| ... | ... | @@ -53,7 +60,7 @@ flagpd1("M"), |
| 53 | 60 | .{ |
| 54 | 61 | .name = "MM", |
| 55 | 62 | .syntax = .flag, |
| 56 | .zig_equivalent = .dep_file_mm, | |
| 63 | .zig_equivalent = .dep_file_to_stdout, | |
| 57 | 64 | .pd1 = true, |
| 58 | 65 | .pd2 = false, |
| 59 | 66 | .psl = false, |
| ... | ... | @@ -1983,7 +1990,7 @@ flagpsl("MT"), |
| 1983 | 1990 | .{ |
| 1984 | 1991 | .name = "user-dependencies", |
| 1985 | 1992 | .syntax = .flag, |
| 1986 | .zig_equivalent = .dep_file_mm, | |
| 1993 | .zig_equivalent = .dep_file_to_stdout, | |
| 1987 | 1994 | .pd1 = false, |
| 1988 | 1995 | .pd2 = true, |
| 1989 | 1996 | .psl = false, |
src/main.zig+3-2| ... | ... | @@ -1657,7 +1657,8 @@ fn buildOutputType( |
| 1657 | 1657 | disable_c_depfile = true; |
| 1658 | 1658 | try clang_argv.appendSlice(it.other_args); |
| 1659 | 1659 | }, |
| 1660 | .dep_file_mm => { // -MM | |
| 1660 | .dep_file_to_stdout => { // -M, -MM | |
| 1661 | // "Like -MD, but also implies -E and writes to stdout by default" | |
| 1661 | 1662 | // "Like -MMD, but also implies -E and writes to stdout by default" |
| 1662 | 1663 | c_out_mode = .preprocessor; |
| 1663 | 1664 | disable_c_depfile = true; |
| ... | ... | @@ -4652,7 +4653,7 @@ pub const ClangArgIterator = struct { |
| 4652 | 4653 | lib_dir, |
| 4653 | 4654 | mcpu, |
| 4654 | 4655 | dep_file, |
| 4655 | dep_file_mm, | |
| 4656 | dep_file_to_stdout, | |
| 4656 | 4657 | framework_dir, |
| 4657 | 4658 | framework, |
| 4658 | 4659 | nostdlibinc, |
tools/update_clang_options.zig+13-9| ... | ... | @@ -386,11 +386,15 @@ const known_options = [_]KnownOpt{ |
| 386 | 386 | }, |
| 387 | 387 | .{ |
| 388 | 388 | .name = "MM", |
| 389 | .ident = "dep_file_mm", | |
| 389 | .ident = "dep_file_to_stdout", | |
| 390 | }, | |
| 391 | .{ | |
| 392 | .name = "M", | |
| 393 | .ident = "dep_file_to_stdout", | |
| 390 | 394 | }, |
| 391 | 395 | .{ |
| 392 | 396 | .name = "user-dependencies", |
| 393 | .ident = "dep_file_mm", | |
| 397 | .ident = "dep_file_to_stdout", | |
| 394 | 398 | }, |
| 395 | 399 | .{ |
| 396 | 400 | .name = "MMD", |
| ... | ... | @@ -497,7 +501,7 @@ const cpu_targets = struct { |
| 497 | 501 | pub const riscv = std.Target.riscv; |
| 498 | 502 | pub const sparc = std.Target.sparc; |
| 499 | 503 | pub const spirv = std.Target.spirv; |
| 500 | pub const systemz = std.Target.systemz; | |
| 504 | pub const s390x = std.Target.s390x; | |
| 501 | 505 | pub const ve = std.Target.ve; |
| 502 | 506 | pub const wasm = std.Target.wasm; |
| 503 | 507 | pub const x86 = std.Target.x86; |
| ... | ... | @@ -647,9 +651,9 @@ pub fn main() anyerror!void { |
| 647 | 651 | \\ .name = "{s}", |
| 648 | 652 | \\ .syntax = {s}, |
| 649 | 653 | \\ .zig_equivalent = .{s}, |
| 650 | \\ .pd1 = {s}, | |
| 651 | \\ .pd2 = {s}, | |
| 652 | \\ .psl = {s}, | |
| 654 | \\ .pd1 = {}, | |
| 655 | \\ .pd2 = {}, | |
| 656 | \\ .psl = {}, | |
| 653 | 657 | \\}}, |
| 654 | 658 | \\ |
| 655 | 659 | , .{ name, final_syntax, ident, pd1, pd2, pslash }); |
| ... | ... | @@ -677,9 +681,9 @@ pub fn main() anyerror!void { |
| 677 | 681 | \\ .name = "{s}", |
| 678 | 682 | \\ .syntax = {s}, |
| 679 | 683 | \\ .zig_equivalent = .other, |
| 680 | \\ .pd1 = {s}, | |
| 681 | \\ .pd2 = {s}, | |
| 682 | \\ .psl = {s}, | |
| 684 | \\ .pd1 = {}, | |
| 685 | \\ .pd2 = {}, | |
| 686 | \\ .psl = {}, | |
| 683 | 687 | \\}}, |
| 684 | 688 | \\ |
| 685 | 689 | , .{ name, syntax, pd1, pd2, pslash }); |