diff options
| author | gingerBill <bill@gingerbill.org> | 2021-06-12 16:23:41 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-06-12 16:23:41 +0100 |
| commit | c2524464f9d1a0cd4dd052309677550232b3957b (patch) | |
| tree | 29d6f8afe697ab76e17c5241fe2cfdf3c6c0a8ca /src/main.cpp | |
| parent | 55e472cdb69202e8dc647293bb94cb50d167476e (diff) | |
Fix `remove_temp_files`
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index bde9f3f7c..66f899a15 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1565,10 +1565,15 @@ void remove_temp_files(lbGenerator *gen) { gb_file_remove(cast(char const *)path.text); } - if (build_context.build_mode != BuildMode_Object && !build_context.keep_object_files) { - for_array(i, gen->output_object_paths) { - String path = gen->output_object_paths[i]; - gb_file_remove(cast(char const *)path.text); + if (!build_context.keep_object_files) { + switch (build_context.build_mode) { + case BuildMode_Executable: + case BuildMode_DynamicLibrary: + for_array(i, gen->output_object_paths) { + String path = gen->output_object_paths[i]; + gb_file_remove(cast(char const *)path.text); + } + break; } } } |