aboutsummaryrefslogtreecommitdiff
path: root/src/linker.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-05-29 19:02:46 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2025-05-29 19:02:46 +0200
commit0d0f311df1e31102f4138c1a28110f86dcf60fca (patch)
treecf89bf11211d897f7e42d6566ba9a23ca7cf2bef /src/linker.cpp
parent7853a1db1c1ab3662767d14da055e59a7434ebcd (diff)
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.
Diffstat (limited to 'src/linker.cpp')
-rw-r--r--src/linker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linker.cpp b/src/linker.cpp
index 71aee3a3b..f10e47ec3 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -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));
}