Skip to content

Commit

Permalink
zig cc: recognize more pie flags
Browse files Browse the repository at this point in the history
This is a bug fix.
  • Loading branch information
andrewrk committed Jun 11, 2021
1 parent f736197 commit caad5c4
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 7 deletions.
63 changes: 56 additions & 7 deletions src/clang_options_data.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3021,8 +3021,22 @@ flagpd1("fno-pch-timestamp"),
flagpd1("fno_pch-validate-input-files-content"),
flagpd1("fno-peel-loops"),
flagpd1("fno-permissive"),
flagpd1("fno-pic"),
flagpd1("fno-pie"),
.{
.name = "fno-pic",
.syntax = .flag,
.zig_equivalent = .no_pic,
.pd1 = true,
.pd2 = false,
.psl = false,
},
.{
.name = "fno-pie",
.syntax = .flag,
.zig_equivalent = .no_pie,
.pd1 = true,
.pd2 = false,
.psl = false,
},
flagpd1("fno-plt"),
flagpd1("fno-prebuilt-implicit-modules"),
flagpd1("fno-prefetch-loop-arrays"),
Expand Down Expand Up @@ -3240,8 +3254,22 @@ flagpd1("fpch-preprocess"),
flagpd1("fpch-validate-input-files-content"),
flagpd1("fpeel-loops"),
flagpd1("fpermissive"),
flagpd1("fpic"),
flagpd1("fpie"),
.{
.name = "fpic",
.syntax = .flag,
.zig_equivalent = .pic,
.pd1 = true,
.pd2 = false,
.psl = false,
},
.{
.name = "fpie",
.syntax = .flag,
.zig_equivalent = .pie,
.pd1 = true,
.pd2 = false,
.psl = false,
},
flagpd1("fplt"),
flagpd1("fprebuilt-implicit-modules"),
flagpd1("fprefetch-loop-arrays"),
Expand Down Expand Up @@ -4125,7 +4153,14 @@ flagpd1("no-implicit-float"),
.pd2 = true,
.psl = false,
},
flagpd1("no-pie"),
.{
.name = "no-pie",
.syntax = .flag,
.zig_equivalent = .no_pie,
.pd1 = true,
.pd2 = false,
.psl = false,
},
flagpd1("no-pthread"),
flagpd1("no-struct-path-tbaa"),
flagpd1("nobuiltininc"),
Expand All @@ -4143,7 +4178,14 @@ flagpd1("nogpulib"),
.psl = false,
},
flagpd1("nomultidefs"),
flagpd1("nopie"),
.{
.name = "nopie",
.syntax = .flag,
.zig_equivalent = .no_pie,
.pd1 = true,
.pd2 = false,
.psl = false,
},
flagpd1("noprebind"),
flagpd1("noprofilelib"),
flagpd1("noseglinkedit"),
Expand Down Expand Up @@ -4239,7 +4281,14 @@ flagpd1("pch-through-hdrstop-use"),
flagpd1("pg"),
flagpd1("pic-is-pie"),
sepd1("pic-level"),
flagpd1("pie"),
.{
.name = "pie",
.syntax = .flag,
.zig_equivalent = .pie,
.pd1 = true,
.pd2 = false,
.psl = false,
},
.{
.name = "pipe",
.syntax = .flag,
Expand Down
28 changes: 28 additions & 0 deletions tools/update_clang_options.zig
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,46 @@ const known_options = [_]KnownOpt{
.name = "fPIC",
.ident = "pic",
},
.{
.name = "fpic",
.ident = "pic",
},
.{
.name = "fno-PIC",
.ident = "no_pic",
},
.{
.name = "fno-pic",
.ident = "no_pic",
},
.{
.name = "fPIE",
.ident = "pie",
},
.{
.name = "fpie",
.ident = "pie",
},
.{
.name = "pie",
.ident = "pie",
},
.{
.name = "fno-PIE",
.ident = "no_pie",
},
.{
.name = "fno-pie",
.ident = "no_pie",
},
.{
.name = "no-pie",
.ident = "no_pie",
},
.{
.name = "nopie",
.ident = "no_pie",
},
.{
.name = "flto",
.ident = "lto",
Expand Down

0 comments on commit caad5c4

Please sign in to comment.