type command-line option values

* pass argv inputs directly to the config command line
* define each option's value type in the switch table so comma splitting
  is applied only to list typed switches
This commit is contained in:
Nikita Smith committed 2026-08-17 22:55:58 -07:00
1 parent 76e267482f
commit efe2a78019
7 files changed
+390 -452

No files matched your search

+2 -2
View File
@@ -1233,7 +1233,7 @@ lnk_load_objs(TP_Context *tp, TP_Arena *arena, LNK_Config *config, LNK_Inputer *
LNK_DirectiveInfo directive_info = lnk_directive_info_from_raw_directives(scratch.arena, obj, raw_directives);
for EachIndex(i, ArrayCount(directive_info.v)) {
for (LNK_Directive *dir = directive_info.v[i].first; dir != 0; dir = dir->next) {
lnk_apply_cmd_option_to_config(config, dir->id, dir->value_list, obj);
lnk_apply_cmd_option_to_config(config, dir->id, dir->value, obj);
}
}
}
@@ -6738,7 +6738,7 @@ lnk_run_type_server(TP_Context *tp, TP_Arena *arena, LNK_Config *config)
{
LNK_CmdLine default_line = lnk_cmd_line_from_stringf_windows_rules(scratch.arena, "/DEBUG:GHASH /NOD /RAD_WRITE_TEMP_FILES");
for EachNode(cmd, LNK_CmdOption, default_line.first_option) {
lnk_apply_cmd_option_to_config(config, cmd->string, cmd->value_strings, &(LNK_Obj){0});
lnk_apply_cmd_option_to_config(config, cmd->string, cmd->value, &(LNK_Obj){0});
}
}