rename "passthrough" → "driver_punt"

- punt when `-E` is supplied
- punt when `-S` is supplied
This commit is contained in:
Michael Dusan 2020-03-21 16:38:58 -04:00 committed by Andrew Kelley
parent 4d9b458f8f
commit 28ad78cb7f
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
5 changed files with 31 additions and 9 deletions

View File

@ -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 = "<unknown>",
.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,

View File

@ -1240,7 +1240,7 @@ pub const ClangArgIterator = extern struct {
positional,
l,
ignore,
passthrough,
driver_punt,
pic,
no_pic,
nostdlib,

View File

@ -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:

View File

@ -326,7 +326,7 @@ enum Stage2ClangArg {
Stage2ClangArgPositional,
Stage2ClangArgL,
Stage2ClangArgIgnore,
Stage2ClangArgPassthrough,
Stage2ClangArgDriverPunt,
Stage2ClangArgPIC,
Stage2ClangArgNoPIC,
Stage2ClangArgNoStdLib,

View File

@ -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{};