remove /RAD_ALT_PCH_DIR

* Instead of matching on file path in LF_PRECOMP, loop over the objects
  with .debug$P and probe leaves at the index specified in LF_PRECOMP.
  If signatures match, use the PCH.
* Demote LNK_Error_PrecompObjNotFound to a recoverable error.
This commit is contained in:
Nikita Smith authored and Ryan Fleury committed 2026-06-19 20:12:27 -07:00
1 parent 9b63131f37
commit 05a024ddb3
5 files changed
+32 -48

No files matched your search

-10
View File
@@ -62,7 +62,6 @@ global read_only LNK_CmdSwitch g_cmd_switch_map[] =
{ LNK_CmdSwitch_WholeArchive, 0, "WHOLEARCHIVE", "[:LIBNAME]", "Force linker to pull in all objs from the specified lib." },
{ LNK_CmdSwitch_Rad_Age, 0, "RAD_AGE", ":#", "Age embeded in EXE and PDB, used to validate incremental build. Default is 1." },
{ LNK_CmdSwitch_Rad_AltPchDir, 0, "RAD_ALT_PCH_DIR", ":PATH", "Alternative directory to search for PCH object files." },
//{ LNK_CmdSwitch_Rad_BuildExp, 0, "RAD_BUILD_EXP", "[:NO]", "Build export data." },
{ LNK_CmdSwitch_Rad_BuildInfo, 0, "RAD_BUILD_INFO", "", "Print build info and exit." },
{ LNK_CmdSwitch_Rad_BuildImpLib, 0, "RAD_BUILD_IMPLIB", "[:NO]", "Build import library." },
@@ -1805,15 +1804,6 @@ lnk_apply_cmd_option_to_config(LNK_Config *config, String8 cmd_name, String8List
lnk_cmd_switch_parse_u32(obj, cmd_switch, value_strings, &config->age, 0);
} break;
case LNK_CmdSwitch_Rad_AltPchDir: {
if (value_strings.node_count == 0) {
lnk_error_cmd_switch(LNK_Error_Cmdl, obj, cmd_switch, "missing parameters");
break;
}
String8List dirs = str8_list_copy(config->arena, &value_strings);
str8_list_concat_in_place(&config->alt_pch_dirs, &dirs);
} break;
//case LNK_CmdSwitch_Rad_BuildExp: {
// LNK_SwitchState state;
// if (lnk_cmd_switch_parse_flag(obj, cmd_switch, value_strings, &state)) {