authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-11 15:56:14-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-11 15:57:52-07:00
logcaad5c49607a910e7f06864dca31ca7a68333ef3
treee690d22de294d2c2487c3ff5d61ca7be42e04f92
parentf7361970b334faf4433b3bd1d5dd6d499860c288

zig cc: recognize more pie flags

This is a bug fix.

2 files changed, 84 insertions(+), 7 deletions(-)

src/clang_options_data.zig+56-7
......@@ -3021,8 +3021,22 @@ flagpd1("fno-pch-timestamp"),
30213021flagpd1("fno_pch-validate-input-files-content"),
30223022flagpd1("fno-peel-loops"),
30233023flagpd1("fno-permissive"),
3024flagpd1("fno-pic"),
3025flagpd1("fno-pie"),
3024.{
3025 .name = "fno-pic",
3026 .syntax = .flag,
3027 .zig_equivalent = .no_pic,
3028 .pd1 = true,
3029 .pd2 = false,
3030 .psl = false,
3031},
3032.{
3033 .name = "fno-pie",
3034 .syntax = .flag,
3035 .zig_equivalent = .no_pie,
3036 .pd1 = true,
3037 .pd2 = false,
3038 .psl = false,
3039},
30263040flagpd1("fno-plt"),
30273041flagpd1("fno-prebuilt-implicit-modules"),
30283042flagpd1("fno-prefetch-loop-arrays"),
......@@ -3240,8 +3254,22 @@ flagpd1("fpch-preprocess"),
32403254flagpd1("fpch-validate-input-files-content"),
32413255flagpd1("fpeel-loops"),
32423256flagpd1("fpermissive"),
3243flagpd1("fpic"),
3244flagpd1("fpie"),
3257.{
3258 .name = "fpic",
3259 .syntax = .flag,
3260 .zig_equivalent = .pic,
3261 .pd1 = true,
3262 .pd2 = false,
3263 .psl = false,
3264},
3265.{
3266 .name = "fpie",
3267 .syntax = .flag,
3268 .zig_equivalent = .pie,
3269 .pd1 = true,
3270 .pd2 = false,
3271 .psl = false,
3272},
32453273flagpd1("fplt"),
32463274flagpd1("fprebuilt-implicit-modules"),
32473275flagpd1("fprefetch-loop-arrays"),
......@@ -4125,7 +4153,14 @@ flagpd1("no-implicit-float"),
41254153 .pd2 = true,
41264154 .psl = false,
41274155},
4128flagpd1("no-pie"),
4156.{
4157 .name = "no-pie",
4158 .syntax = .flag,
4159 .zig_equivalent = .no_pie,
4160 .pd1 = true,
4161 .pd2 = false,
4162 .psl = false,
4163},
41294164flagpd1("no-pthread"),
41304165flagpd1("no-struct-path-tbaa"),
41314166flagpd1("nobuiltininc"),
......@@ -4143,7 +4178,14 @@ flagpd1("nogpulib"),
41434178 .psl = false,
41444179},
41454180flagpd1("nomultidefs"),
4146flagpd1("nopie"),
4181.{
4182 .name = "nopie",
4183 .syntax = .flag,
4184 .zig_equivalent = .no_pie,
4185 .pd1 = true,
4186 .pd2 = false,
4187 .psl = false,
4188},
41474189flagpd1("noprebind"),
41484190flagpd1("noprofilelib"),
41494191flagpd1("noseglinkedit"),
......@@ -4239,7 +4281,14 @@ flagpd1("pch-through-hdrstop-use"),
42394281flagpd1("pg"),
42404282flagpd1("pic-is-pie"),
42414283sepd1("pic-level"),
4242flagpd1("pie"),
4284.{
4285 .name = "pie",
4286 .syntax = .flag,
4287 .zig_equivalent = .pie,
4288 .pd1 = true,
4289 .pd2 = false,
4290 .psl = false,
4291},
42434292.{
42444293 .name = "pipe",
42454294 .syntax = .flag,
tools/update_clang_options.zig+28
......@@ -50,18 +50,46 @@ const known_options = [_]KnownOpt{
5050 .name = "fPIC",
5151 .ident = "pic",
5252 },
53 .{
54 .name = "fpic",
55 .ident = "pic",
56 },
5357 .{
5458 .name = "fno-PIC",
5559 .ident = "no_pic",
5660 },
61 .{
62 .name = "fno-pic",
63 .ident = "no_pic",
64 },
5765 .{
5866 .name = "fPIE",
5967 .ident = "pie",
6068 },
69 .{
70 .name = "fpie",
71 .ident = "pie",
72 },
73 .{
74 .name = "pie",
75 .ident = "pie",
76 },
6177 .{
6278 .name = "fno-PIE",
6379 .ident = "no_pie",
6480 },
81 .{
82 .name = "fno-pie",
83 .ident = "no_pie",
84 },
85 .{
86 .name = "no-pie",
87 .ident = "no_pie",
88 },
89 .{
90 .name = "nopie",
91 .ident = "no_pie",
92 },
6593 .{
6694 .name = "flto",
6795 .ident = "lto",