Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions src/clang_options_data.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2480,7 +2480,14 @@ flagpd1("dwarf-ext-refs"),
},
sepd1("dylib_file"),
flagpd1("dylinker"),
flagpd1("dynamic"),
.{
.name = "dynamic",
.syntax = .flag,
.zig_equivalent = .dynamic,
.pd1 = true,
.pd2 = false,
.psl = false,
},
.{
.name = "dynamiclib",
.syntax = .flag,
Expand Down Expand Up @@ -4028,7 +4035,7 @@ flagpd1("menable-unsafe-fp-math"),
m("menqcmd"),
m("mexception-handling"),
m("mexecute-only"),
flagpd1("mextended-const"),
m("mextended-const"),
flagpd1("mextern-sdata"),
m("mf16c"),
flagpd1("mfancy-math-387"),
Expand All @@ -4037,7 +4044,7 @@ flagpd1("mfix4300"),
flagpd1("mfix-and-continue"),
m("mfix-cmse-cve-2021-35465"),
m("mfix-cortex-a53-835769"),
flagpd1("mfix-cortex-a57-aes-1742098"),
m("mfix-cortex-a57-aes-1742098"),
flagpd1("mfix-cortex-a72-aes-1655431"),
m("mfloat128"),
sepd1("mfloat-abi"),
Expand Down Expand Up @@ -4188,12 +4195,12 @@ m("mno-enqcmd"),
m("mno-exception-handling"),
flagpd1("mnoexecstack"),
m("mno-execute-only"),
flagpd1("mno-extended-const"),
m("mno-extended-const"),
flagpd1("mno-extern-sdata"),
m("mno-f16c"),
m("mno-fix-cmse-cve-2021-35465"),
m("mno-fix-cortex-a53-835769"),
flagpd1("mno-fix-cortex-a57-aes-1742098"),
m("mno-fix-cortex-a57-aes-1742098"),
flagpd1("mno-fix-cortex-a72-aes-1655431"),
m("mno-float128"),
m("mno-fma"),
Expand Down Expand Up @@ -4272,7 +4279,7 @@ m("mno-prfchw"),
m("mno-ptwrite"),
flagpd1("mno-pure-code"),
m("mno-rdpid"),
flagpd1("mno-rdpru"),
m("mno-rdpru"),
m("mno-rdrnd"),
m("mno-rdseed"),
.{
Expand Down Expand Up @@ -4382,7 +4389,7 @@ m("mptwrite"),
flagpd1("mpure-code"),
flagpd1("mqdsp6-compat"),
m("mrdpid"),
flagpd1("mrdpru"),
m("mrdpru"),
m("mrdrnd"),
m("mrdseed"),
flagpd1("mreassociate"),
Expand Down Expand Up @@ -5034,7 +5041,7 @@ sepd1("stack-usage-file"),
.{
.name = "static",
.syntax = .flag,
.zig_equivalent = .other,
.zig_equivalent = .static,
.pd1 = true,
.pd2 = true,
.psl = false,
Expand Down
4 changes: 4 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,8 @@ fn buildOutputType(
};
}
},
.dynamic => link_mode = .Dynamic,
.static => link_mode = .Static,
}
}
// Parse linker args.
Expand Down Expand Up @@ -4750,6 +4752,8 @@ pub const ClangArgIterator = struct {
weak_framework,
headerpad_max_install_names,
compress_debug_sections,
dynamic,
static,
};

const Args = struct {
Expand Down
10 changes: 9 additions & 1 deletion tools/update_clang_options.zig
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,14 @@ const known_options = [_]KnownOpt{
.name = "compress-debug-sections=",
.ident = "compress_debug_sections",
},
.{
.name = "dynamic",
.ident = "dynamic",
},
.{
.name = "static",
.ident = "static",
},
};

const blacklisted_options = [_][]const u8{};
Expand Down Expand Up @@ -798,7 +806,7 @@ fn objSyntax(obj: *json.ObjectMap) ?Syntax {
} else if (std.mem.eql(u8, superclass, "CLRemainingArgsJoined")) {
return .remaining_args_joined;
} else if (std.mem.eql(u8, superclass, "MultiArg")) {
return .{ .multi_arg = num_args };
return Syntax{ .multi_arg = num_args };
}
}
const name = obj.get("Name").?.String;
Expand Down