mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-02 03:02:37 +00:00
Always provide /PDB option to linker if generating debug info.
radlink by default places the .PDB file in the working directory, even if /OUT says to place it elsewhere, unlike link.exe, which places it next to the executable by default. So, if compiling using -debug, we generate a PDB path even if -pdb-name wasn't used to override it.
This commit is contained in:
@@ -281,7 +281,7 @@ try_cross_linking:;
|
||||
link_settings = gb_string_append_fmt(link_settings, " /ENTRY:mainCRTStartup");
|
||||
}
|
||||
|
||||
if (build_context.pdb_filepath != "") {
|
||||
if (build_context.build_paths[BuildPath_PDB].name != "") {
|
||||
String pdb_path = path_to_string(heap_allocator(), build_context.build_paths[BuildPath_PDB]);
|
||||
link_settings = gb_string_append_fmt(link_settings, " /PDB:\"%.*s\"", LIT(pdb_path));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user