diff --git a/src/clang_options_data.zig b/src/clang_options_data.zig index d4320b1619..76e687c7d6 100644 --- a/src/clang_options_data.zig +++ b/src/clang_options_data.zig @@ -33,7 +33,14 @@ flagpd1("H"), .psl = false, }, flagpd1("I-"), -flagpd1("M"), +.{ + .name = "M", + .syntax = .flag, + .zig_equivalent = .dep_file_to_stdout, + .pd1 = true, + .pd2 = false, + .psl = false, +}, .{ .name = "MD", .syntax = .flag, @@ -53,7 +60,7 @@ flagpd1("M"), .{ .name = "MM", .syntax = .flag, - .zig_equivalent = .dep_file_mm, + .zig_equivalent = .dep_file_to_stdout, .pd1 = true, .pd2 = false, .psl = false, @@ -1983,7 +1990,7 @@ flagpsl("MT"), .{ .name = "user-dependencies", .syntax = .flag, - .zig_equivalent = .dep_file_mm, + .zig_equivalent = .dep_file_to_stdout, .pd1 = false, .pd2 = true, .psl = false, diff --git a/src/main.zig b/src/main.zig index f192137b3c..0c6e4a63a3 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1657,7 +1657,8 @@ fn buildOutputType( disable_c_depfile = true; try clang_argv.appendSlice(it.other_args); }, - .dep_file_mm => { // -MM + .dep_file_to_stdout => { // -M, -MM + // "Like -MD, but also implies -E and writes to stdout by default" // "Like -MMD, but also implies -E and writes to stdout by default" c_out_mode = .preprocessor; disable_c_depfile = true; @@ -4652,7 +4653,7 @@ pub const ClangArgIterator = struct { lib_dir, mcpu, dep_file, - dep_file_mm, + dep_file_to_stdout, framework_dir, framework, nostdlibinc, diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig index 2c13f1082b..d261b5ee33 100644 --- a/tools/update_clang_options.zig +++ b/tools/update_clang_options.zig @@ -386,11 +386,15 @@ const known_options = [_]KnownOpt{ }, .{ .name = "MM", - .ident = "dep_file_mm", + .ident = "dep_file_to_stdout", + }, + .{ + .name = "M", + .ident = "dep_file_to_stdout", }, .{ .name = "user-dependencies", - .ident = "dep_file_mm", + .ident = "dep_file_to_stdout", }, .{ .name = "MMD", @@ -497,7 +501,7 @@ const cpu_targets = struct { pub const riscv = std.Target.riscv; pub const sparc = std.Target.sparc; pub const spirv = std.Target.spirv; - pub const systemz = std.Target.systemz; + pub const s390x = std.Target.s390x; pub const ve = std.Target.ve; pub const wasm = std.Target.wasm; pub const x86 = std.Target.x86; @@ -647,9 +651,9 @@ pub fn main() anyerror!void { \\ .name = "{s}", \\ .syntax = {s}, \\ .zig_equivalent = .{s}, - \\ .pd1 = {s}, - \\ .pd2 = {s}, - \\ .psl = {s}, + \\ .pd1 = {}, + \\ .pd2 = {}, + \\ .psl = {}, \\}}, \\ , .{ name, final_syntax, ident, pd1, pd2, pslash }); @@ -677,9 +681,9 @@ pub fn main() anyerror!void { \\ .name = "{s}", \\ .syntax = {s}, \\ .zig_equivalent = .other, - \\ .pd1 = {s}, - \\ .pd2 = {s}, - \\ .psl = {s}, + \\ .pd1 = {}, + \\ .pd2 = {}, + \\ .psl = {}, \\}}, \\ , .{ name, syntax, pd1, pd2, pslash });