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-14 12:13:03-07:00
log9c1e7de6c62467006dca1c45bb9c683904b34c5d
tree00aec2c6a23ff94adf2ccc018e02a890c8f38469
parent54229fec337f61cad2243f416966892136285683

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"),...@@ -3021,8 +3021,22 @@ flagpd1("fno-pch-timestamp"),
3021flagpd1("fno_pch-validate-input-files-content"),3021flagpd1("fno_pch-validate-input-files-content"),
3022flagpd1("fno-peel-loops"),3022flagpd1("fno-peel-loops"),
3023flagpd1("fno-permissive"),3023flagpd1("fno-permissive"),
3024flagpd1("fno-pic"),3024.{
3025flagpd1("fno-pie"),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},
3026flagpd1("fno-plt"),3040flagpd1("fno-plt"),
3027flagpd1("fno-prebuilt-implicit-modules"),3041flagpd1("fno-prebuilt-implicit-modules"),
3028flagpd1("fno-prefetch-loop-arrays"),3042flagpd1("fno-prefetch-loop-arrays"),
...@@ -3240,8 +3254,22 @@ flagpd1("fpch-preprocess"),...@@ -3240,8 +3254,22 @@ flagpd1("fpch-preprocess"),
3240flagpd1("fpch-validate-input-files-content"),3254flagpd1("fpch-validate-input-files-content"),
3241flagpd1("fpeel-loops"),3255flagpd1("fpeel-loops"),
3242flagpd1("fpermissive"),3256flagpd1("fpermissive"),
3243flagpd1("fpic"),3257.{
3244flagpd1("fpie"),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},
3245flagpd1("fplt"),3273flagpd1("fplt"),
3246flagpd1("fprebuilt-implicit-modules"),3274flagpd1("fprebuilt-implicit-modules"),
3247flagpd1("fprefetch-loop-arrays"),3275flagpd1("fprefetch-loop-arrays"),
...@@ -4125,7 +4153,14 @@ flagpd1("no-implicit-float"),...@@ -4125,7 +4153,14 @@ flagpd1("no-implicit-float"),
4125 .pd2 = true,4153 .pd2 = true,
4126 .psl = false,4154 .psl = false,
4127},4155},
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},
4129flagpd1("no-pthread"),4164flagpd1("no-pthread"),
4130flagpd1("no-struct-path-tbaa"),4165flagpd1("no-struct-path-tbaa"),
4131flagpd1("nobuiltininc"),4166flagpd1("nobuiltininc"),
...@@ -4143,7 +4178,14 @@ flagpd1("nogpulib"),...@@ -4143,7 +4178,14 @@ flagpd1("nogpulib"),
4143 .psl = false,4178 .psl = false,
4144},4179},
4145flagpd1("nomultidefs"),4180flagpd1("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},
4147flagpd1("noprebind"),4189flagpd1("noprebind"),
4148flagpd1("noprofilelib"),4190flagpd1("noprofilelib"),
4149flagpd1("noseglinkedit"),4191flagpd1("noseglinkedit"),
...@@ -4239,7 +4281,14 @@ flagpd1("pch-through-hdrstop-use"),...@@ -4239,7 +4281,14 @@ flagpd1("pch-through-hdrstop-use"),
4239flagpd1("pg"),4281flagpd1("pg"),
4240flagpd1("pic-is-pie"),4282flagpd1("pic-is-pie"),
4241sepd1("pic-level"),4283sepd1("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},
4243.{4292.{
4244 .name = "pipe",4293 .name = "pipe",
4245 .syntax = .flag,4294 .syntax = .flag,
tools/update_clang_options.zig+28
...@@ -50,18 +50,46 @@ const known_options = [_]KnownOpt{...@@ -50,18 +50,46 @@ const known_options = [_]KnownOpt{
50 .name = "fPIC",50 .name = "fPIC",
51 .ident = "pic",51 .ident = "pic",
52 },52 },
53 .{
54 .name = "fpic",
55 .ident = "pic",
56 },
53 .{57 .{
54 .name = "fno-PIC",58 .name = "fno-PIC",
55 .ident = "no_pic",59 .ident = "no_pic",
56 },60 },
61 .{
62 .name = "fno-pic",
63 .ident = "no_pic",
64 },
57 .{65 .{
58 .name = "fPIE",66 .name = "fPIE",
59 .ident = "pie",67 .ident = "pie",
60 },68 },
69 .{
70 .name = "fpie",
71 .ident = "pie",
72 },
73 .{
74 .name = "pie",
75 .ident = "pie",
76 },
61 .{77 .{
62 .name = "fno-PIE",78 .name = "fno-PIE",
63 .ident = "no_pie",79 .ident = "no_pie",
64 },80 },
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 },
65 .{93 .{
66 .name = "flto",94 .name = "flto",
67 .ident = "lto",95 .ident = "lto",