aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-02-17 13:08:20 +0000
committergingerBill <bill@gingerbill.org>2023-02-17 13:08:20 +0000
commitd86df8321c2461651379aa280e6b78a73e71f9b1 (patch)
tree72ba1cbb1c61e59f33092da211e69eeae7b418cd /src/main.cpp
parent806f56ca3897b422be7fc3cc068b23c2eeb682c9 (diff)
Fix #2330
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9c44af335..480930d4a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1835,6 +1835,17 @@ gb_internal void show_timings(Checker *c, Timings *t) {
gb_internal void remove_temp_files(lbGenerator *gen) {
if (build_context.keep_temp_files) return;
+ switch (build_context.build_mode) {
+ case BuildMode_Executable:
+ case BuildMode_DynamicLibrary:
+ break;
+
+ case BuildMode_Object:
+ case BuildMode_Assembly:
+ case BuildMode_LLVM_IR:
+ return;
+ }
+
TIME_SECTION("remove keep temp files");
for (String const &path : gen->output_temp_paths) {