Commit 9c1e7de6c6

Andrew Kelley <andrew@ziglang.org>
2021-06-12 00:56:14
zig cc: recognize more pie flags
This is a bug fix.
1 parent 54229fe
src/clang_options_data.zig
@@ -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"),
@@ -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"),
@@ -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"),
@@ -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"),
@@ -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,
tools/update_clang_options.zig
@@ -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",