From 28ad78cb7f4a567ce6a595b8ff466e90b311f3e4 Mon Sep 17 00:00:00 2001 From: Michael Dusan Date: Sat, 21 Mar 2020 16:38:58 -0400 Subject: [PATCH] =?UTF-8?q?rename=20"passthrough"=20=E2=86=92=20"driver=5F?= =?UTF-8?q?punt"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - punt when `-E` is supplied - punt when `-S` is supplied --- src-self-hosted/clang_options_data.zig | 24 +++++++++++++++++++----- src-self-hosted/stage2.zig | 2 +- src/main.cpp | 2 +- src/stage2.h | 2 +- tools/update_clang_options.zig | 10 +++++++++- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src-self-hosted/clang_options_data.zig b/src-self-hosted/clang_options_data.zig index a21069f93..bfd26c6de 100644 --- a/src-self-hosted/clang_options_data.zig +++ b/src-self-hosted/clang_options_data.zig @@ -4,7 +4,14 @@ usingnamespace @import("clang_options.zig"); pub const data = blk: { @setEvalBranchQuota(6000); break :blk &[_]CliArg{ flagpd1("C"), flagpd1("CC"), -flagpd1("E"), +.{ + .name = "E", + .syntax = .flag, + .zig_equivalent = .driver_punt, + .pd1 = true, + .pd2 = false, + .psl = false, +}, flagpd1("EB"), flagpd1("EL"), flagpd1("Eonly"), @@ -36,7 +43,14 @@ flagpd1("Q"), flagpd1("Qn"), flagpd1("Qunused-arguments"), flagpd1("Qy"), -flagpd1("S"), +.{ + .name = "S", + .syntax = .flag, + .zig_equivalent = .driver_punt, + .pd1 = true, + .pd2 = false, + .psl = false, +}, .{ .name = "", .syntax = .flag, @@ -119,7 +133,7 @@ flagpd1("###"), .{ .name = "E", .syntax = .flag, - .zig_equivalent = .other, + .zig_equivalent = .driver_punt, .pd1 = true, .pd2 = false, .psl = true, @@ -1127,7 +1141,7 @@ flagpd1("###"), .{ .name = "help", .syntax = .flag, - .zig_equivalent = .passthrough, + .zig_equivalent = .driver_punt, .pd1 = true, .pd2 = false, .psl = true, @@ -3131,7 +3145,7 @@ sepd1("header-include-file"), .{ .name = "help", .syntax = .flag, - .zig_equivalent = .passthrough, + .zig_equivalent = .driver_punt, .pd1 = true, .pd2 = true, .psl = false, diff --git a/src-self-hosted/stage2.zig b/src-self-hosted/stage2.zig index 73a053b85..45fa2ec3e 100644 --- a/src-self-hosted/stage2.zig +++ b/src-self-hosted/stage2.zig @@ -1240,7 +1240,7 @@ pub const ClangArgIterator = extern struct { positional, l, ignore, - passthrough, + driver_punt, pic, no_pic, nostdlib, diff --git a/src/main.cpp b/src/main.cpp index fc73cb78d..d64b8dcdb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -630,7 +630,7 @@ static int main0(int argc, char **argv) { break; case Stage2ClangArgIgnore: break; - case Stage2ClangArgPassthrough: + case Stage2ClangArgDriverPunt: // Never mind what we're doing, just pass the args directly. For example --help. return ZigClang_main(argc, argv); case Stage2ClangArgPIC: diff --git a/src/stage2.h b/src/stage2.h index 6b94f8780..5f233f9fc 100644 --- a/src/stage2.h +++ b/src/stage2.h @@ -326,7 +326,7 @@ enum Stage2ClangArg { Stage2ClangArgPositional, Stage2ClangArgL, Stage2ClangArgIgnore, - Stage2ClangArgPassthrough, + Stage2ClangArgDriverPunt, Stage2ClangArgPIC, Stage2ClangArgNoPIC, Stage2ClangArgNoStdLib, diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig index c820ee34a..b4cec5afd 100644 --- a/tools/update_clang_options.zig +++ b/tools/update_clang_options.zig @@ -44,7 +44,7 @@ const known_options = [_]KnownOpt{ }, .{ .name = "help", - .ident = "passthrough", + .ident = "driver_punt", }, .{ .name = "fPIC", @@ -74,6 +74,14 @@ const known_options = [_]KnownOpt{ .name = "Wl,", .ident = "wl", }, + .{ + .name = "E", + .ident = "driver_punt", + }, + .{ + .name = "S", + .ident = "driver_punt", + }, }; const blacklisted_options = [_][]const u8{};