Add missing clang opts: -install_name and -undefined

This commit is contained in:
Jakub Konka 2022-12-18 00:33:00 +01:00 committed by Andrew Kelley
parent 23c09598c7
commit 0420ad0292
3 changed files with 36 additions and 2 deletions

View file

@ -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,

View file

@ -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 {

View file

@ -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{};