WIP stripped PDB

This commit is contained in:
Nikita Smith
2026-04-10 17:02:04 -07:00
parent b4bbc38ab2
commit 89a5acba2c
7 changed files with 152 additions and 40 deletions
+8
View File
@@ -53,6 +53,7 @@ global read_only LNK_CmdSwitch g_cmd_switch_map[] =
{ LNK_CmdSwitch_Pdb, 0, "PDB", ":FILENAME", "File name of the output PDB." },
{ LNK_CmdSwitch_PdbAltPath, 0, "PDBALTPATH", ":PATH", "Alternative output path for the PDB." },
{ LNK_CmdSwitch_PdbPageSize, 0, "PDBPAGESIZE", ":#", "Page size must be power of two." },
{ LNK_CmdSwitch_PdbStripped, 0, "PDBSTRIPPED", ":FILENAME", "Create a stripped PDB containing public symbols, a section map, and a list of object files." },
{ LNK_CmdSwitch_Release, 1, "RELEASE", "", "Write image checksum." },
{ LNK_CmdSwitch_Stack, 1, "STACK", ":RESERVE[,COMMIT]", "Set reserve and commit size for the stack." },
{ LNK_CmdSwitch_SubSystem, 1, "SUBSYSTEM", ":{CONSOLE|NATIVE|WINDOWS}[,#[.##]]", "Set subsystem for the image." },
@@ -1721,6 +1722,13 @@ lnk_apply_cmd_option_to_config(LNK_Config *config, String8 cmd_name, String8List
}
} break;
case LNK_CmdSwitch_PdbStripped: {
String8 file_name;
if (lnk_cmd_switch_parse_string(obj, cmd_switch, value_strings, &file_name)) {
config->pdb_stripped_name = str8_copy(config->arena, file_name);
}
} break;
case LNK_CmdSwitch_Release: {
if (value_strings.node_count == 0) {
config->flags |= LNK_ConfigFlag_WriteImageChecksum;