set default values for unload and nobind

This commit is contained in:
Nikita Smith
2026-01-16 18:41:15 -08:00
parent 0168448924
commit 4ab89cd120
+9 -2
View File
@@ -1259,9 +1259,9 @@ lnk_apply_cmd_option_to_config(LNK_Config *config, String8 cmd_name, String8List
} else { } else {
String8 value = value_strings.first->string; String8 value = value_strings.first->string;
if (str8_match_lit("unload", value, StringMatchFlag_CaseInsensitive)) { if (str8_match_lit("unload", value, StringMatchFlag_CaseInsensitive)) {
config->import_table_emit_uiat = 1; config->import_table_emit_uiat = LNK_SwitchState_Yes;
} else if (str8_match_lit("nobind", value, StringMatchFlag_CaseInsensitive)) { } else if (str8_match_lit("nobind", value, StringMatchFlag_CaseInsensitive)) {
config->import_table_emit_biat = 0; config->import_table_emit_biat = LNK_SwitchState_No;
} else { } else {
lnk_error_cmd_switch(LNK_Error_Cmdl, obj, cmd_switch, "unknown parameter \"%S\"", value); lnk_error_cmd_switch(LNK_Error_Cmdl, obj, cmd_switch, "unknown parameter \"%S\"", value);
} }
@@ -2153,6 +2153,13 @@ lnk_config_from_cmd_line(String8List raw_cmd_line, LNK_CmdLine cmd_line)
config->import_table_emit_biat = LNK_SwitchState_No; config->import_table_emit_biat = LNK_SwitchState_No;
} }
if (config->import_table_emit_biat == LNK_SwitchState_Null) {
config->import_table_emit_biat = LNK_SwitchState_Yes;
}
if (config->import_table_emit_uiat == LNK_SwitchState_Null) {
config->import_table_emit_uiat = LNK_SwitchState_Yes;
}
// set flags for /OPT // set flags for /OPT
{ {
// these flags remove and merge inline functions and methods defined in class, // these flags remove and merge inline functions and methods defined in class,