commit 7cc417644862a9b9523545f4455da7722afc8209 (tree)
parent 59359b25474724018c14b8cb685837f4480c0de5
Author: Jakub Konka <kubkon@jakubkonka.com>
Date: Wed, 29 Jun 2022 08:17:49 +0200
clang: add Zig equivalent for -headerpad_max_install_names cli flag
Diffstat:
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/clang_options_data.zig b/src/clang_options_data.zig
@@ -4978,7 +4978,14 @@ joinpd1("fdiagnostics-show-category="),
joinpd1("fdiagnostics-show-location="),
joinpd1("fopenmp-cuda-blocks-per-sm="),
jspd1("fxray-instruction-threshold"),
-joinpd1("headerpad_max_install_names"),
+.{
+ .name = "headerpad_max_install_names",
+ .syntax = .joined,
+ .zig_equivalent = .headerpad_max_install_names,
+ .pd1 = true,
+ .pd2 = false,
+ .psl = false,
+},
.{
.name = "libomptarget-nvptx-bc-path=",
.syntax = .joined,
diff --git a/src/main.zig b/src/main.zig
@@ -1627,6 +1627,7 @@ fn buildOutputType(
},
.weak_library => try system_libs.put(it.only_arg, .{ .weak = true }),
.weak_framework => try frameworks.put(gpa, it.only_arg, .{ .weak = true }),
+ .headerpad_max_install_names => headerpad_max_install_names = true,
}
}
// Parse linker args.
@@ -4581,6 +4582,7 @@ pub const ClangArgIterator = struct {
entry,
weak_library,
weak_framework,
+ headerpad_max_install_names,
};
const Args = struct {
diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig
@@ -444,6 +444,10 @@ const known_options = [_]KnownOpt{
.name = "weak_framework",
.ident = "weak_framework",
},
+ .{
+ .name = "headerpad_max_install_names",
+ .ident = "headerpad_max_install_names",
+ },
};
const blacklisted_options = [_][]const u8{};