diff --git a/src/clang_options_data.zig b/src/clang_options_data.zig index 995ef353fa..6db3489a47 100644 --- a/src/clang_options_data.zig +++ b/src/clang_options_data.zig @@ -3932,7 +3932,14 @@ sepd1("include-pch"), flagpd1("index-header-map"), sepd1("init"), flagpd1("init-only"), -sepd1("install_name"), +.{ + .name = "install_name", + .syntax = .separate, + .zig_equivalent = .install_name, + .pd1 = true, + .pd2 = false, + .psl = false, +}, flagpd1("keep_private_externs"), sepd1("lazy_framework"), sepd1("lazy_library"), @@ -6326,7 +6333,14 @@ joinpd1("ftabstop="), jspd1("idirafter"), joinpd1("mregparm="), joinpd1("sycl-std="), -jspd1("undefined"), +.{ + .name = "undefined", + .syntax = .joined_or_separate, + .zig_equivalent = .undefined, + .pd1 = true, + .pd2 = false, + .psl = false, +}, .{ .name = "extdirs=", .syntax = .joined, diff --git a/src/main.zig b/src/main.zig index 3c39c46a0a..d442284219 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1658,6 +1658,16 @@ fn buildOutputType( }; } }, + .install_name => { + install_name = it.only_arg; + }, + .undefined => { + if (mem.eql(u8, "dynamic_lookup", it.only_arg)) { + linker_allow_shlib_undefined = true; + } else { + fatal("unsupported -undefined option '{s}'", .{it.only_arg}); + } + }, } } // Parse linker args. @@ -4719,6 +4729,8 @@ pub const ClangArgIterator = struct { weak_framework, headerpad_max_install_names, compress_debug_sections, + install_name, + undefined, }; const Args = struct { diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig index 92e0757ac7..889e5bcbfe 100644 --- a/tools/update_clang_options.zig +++ b/tools/update_clang_options.zig @@ -492,6 +492,14 @@ const known_options = [_]KnownOpt{ .name = "compress-debug-sections=", .ident = "compress_debug_sections", }, + .{ + .name = "install_name", + .ident = "install_name", + }, + .{ + .name = "undefined", + .ident = "undefined", + }, }; const blacklisted_options = [_][]const u8{};