Skip to content

Commit

Permalink
clang: add Zig equivalent for -headerpad_max_install_names cli flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kubkon committed Jun 29, 2022
1 parent 59359b2 commit 7cc4176
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/clang_options_data.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -4581,6 +4582,7 @@ pub const ClangArgIterator = struct {
entry,
weak_library,
weak_framework,
headerpad_max_install_names,
};

const Args = struct {
Expand Down
4 changes: 4 additions & 0 deletions tools/update_clang_options.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down

0 comments on commit 7cc4176

Please sign in to comment.