diff options
| author | gingerBill <bill@gingerbill.org> | 2021-05-03 17:43:14 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-05-03 17:43:14 +0100 |
| commit | 746e880eb521e6cf5b6a452004da9bc5d2095076 (patch) | |
| tree | 7174a4d70632e65d11824d956df00e14bad13188 /src/main.cpp | |
| parent | e4286d0ff9d383d03b220ac8fc52934853b35c34 (diff) | |
Begin work on making LLVM backend work with multiple modules for possible faster compilation
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 48fb4dcc3..530492cbb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1542,12 +1542,19 @@ void show_timings(Checker *c, Timings *t) { } } -void remove_temp_files(String output_base) { +void remove_temp_files(lbGenerator *gen) { if (build_context.keep_temp_files) return; + String output_base = gen->output_base; + auto data = array_make<u8>(heap_allocator(), output_base.len + 30); defer (array_free(&data)); + for_array(i, gen->output_object_paths) { + String path = gen->output_object_paths[i]; + gb_file_remove(cast(char const *)path.text); + } + isize n = output_base.len; gb_memmove(data.data, output_base.text, n); #define EXT_REMOVE(s) do { \ @@ -2183,7 +2190,7 @@ int main(int arg_count, char const **arg_ptr) { show_timings(&checker, timings); } - remove_temp_files(gen.output_base); + remove_temp_files(&gen); if (run_output) { #if defined(GB_SYSTEM_WINDOWS) |