authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-12-18 00:33:00+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-12-18 15:52:51+01:00
loge9e804edc899d8392c9f93a19b92be603c26df79
treef49ff308e79dce3c825bdd2cba675dbc9aca0aaa
parent11a81e1b29ecefd7aad2ebe951743c44272e1817

Add missing clang opts: -install_name and -undefined


3 files changed, 36 insertions(+), 2 deletions(-)

src/clang_options_data.zig+16-2
...@@ -3932,7 +3932,14 @@ sepd1("include-pch"),...@@ -3932,7 +3932,14 @@ sepd1("include-pch"),
3932flagpd1("index-header-map"),3932flagpd1("index-header-map"),
3933sepd1("init"),3933sepd1("init"),
3934flagpd1("init-only"),3934flagpd1("init-only"),
3935sepd1("install_name"),3935.{
3936 .name = "install_name",
3937 .syntax = .separate,
3938 .zig_equivalent = .install_name,
3939 .pd1 = true,
3940 .pd2 = false,
3941 .psl = false,
3942},
3936flagpd1("keep_private_externs"),3943flagpd1("keep_private_externs"),
3937sepd1("lazy_framework"),3944sepd1("lazy_framework"),
3938sepd1("lazy_library"),3945sepd1("lazy_library"),
...@@ -6326,7 +6333,14 @@ joinpd1("ftabstop="),...@@ -6326,7 +6333,14 @@ joinpd1("ftabstop="),
6326jspd1("idirafter"),6333jspd1("idirafter"),
6327joinpd1("mregparm="),6334joinpd1("mregparm="),
6328joinpd1("sycl-std="),6335joinpd1("sycl-std="),
6329jspd1("undefined"),6336.{
6337 .name = "undefined",
6338 .syntax = .joined_or_separate,
6339 .zig_equivalent = .undefined,
6340 .pd1 = true,
6341 .pd2 = false,
6342 .psl = false,
6343},
6330.{6344.{
6331 .name = "extdirs=",6345 .name = "extdirs=",
6332 .syntax = .joined,6346 .syntax = .joined,
src/main.zig+12
...@@ -1697,6 +1697,16 @@ fn buildOutputType(...@@ -1697,6 +1697,16 @@ fn buildOutputType(
1697 };1697 };
1698 }1698 }
1699 },1699 },
1700 .install_name => {
1701 install_name = it.only_arg;
1702 },
1703 .undefined => {
1704 if (mem.eql(u8, "dynamic_lookup", it.only_arg)) {
1705 linker_allow_shlib_undefined = true;
1706 } else {
1707 fatal("unsupported -undefined option '{s}'", .{it.only_arg});
1708 }
1709 },
1700 }1710 }
1701 }1711 }
1702 // Parse linker args.1712 // Parse linker args.
...@@ -4791,6 +4801,8 @@ pub const ClangArgIterator = struct {...@@ -4791,6 +4801,8 @@ pub const ClangArgIterator = struct {
4791 weak_framework,4801 weak_framework,
4792 headerpad_max_install_names,4802 headerpad_max_install_names,
4793 compress_debug_sections,4803 compress_debug_sections,
4804 install_name,
4805 undefined,
4794 };4806 };
47954807
4796 const Args = struct {4808 const Args = struct {
tools/update_clang_options.zig+8
...@@ -492,6 +492,14 @@ const known_options = [_]KnownOpt{...@@ -492,6 +492,14 @@ const known_options = [_]KnownOpt{
492 .name = "compress-debug-sections=",492 .name = "compress-debug-sections=",
493 .ident = "compress_debug_sections",493 .ident = "compress_debug_sections",
494 },494 },
495 .{
496 .name = "install_name",
497 .ident = "install_name",
498 },
499 .{
500 .name = "undefined",
501 .ident = "undefined",
502 },
495};503};
496504
497const blacklisted_options = [_][]const u8{};505const blacklisted_options = [_][]const u8{};