diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-01 13:37:26 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-01 13:37:26 +0200 |
| commit | 349a34cb1ae1e37f791aaf44dc0a298aff4e1e78 (patch) | |
| tree | 25d92ca118c96d256f9f36711a85b924c0b5a772 | |
| parent | 074708ddc4f0e9ffeabb5273c3342fa431000494 (diff) | |
Also delete .pdb unless -keep-executable is supplied
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index dfc2f3213..b0f839509 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3889,6 +3889,14 @@ end_of_code_gen:; if (!build_context.keep_executable) { char const *filename = cast(char const *)exe_name.text; gb_file_remove(filename); + + if (build_context.metrics.os == TargetOs_windows && build_context.ODIN_DEBUG) { + String pdb_path = path_to_string(heap_allocator(), build_context.build_paths[BuildPath_PDB]); + defer (gb_free(heap_allocator(), pdb_path.text)); + + filename = cast(char const *)pdb_path.text; + gb_file_remove(filename); + } } } return 0; |