mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-16 16:14:06 +00:00
Begin work on making LLVM backend work with multiple modules for possible faster compilation
This commit is contained in:
11
src/main.cpp
11
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)
|
||||
|
||||
Reference in New Issue
Block a user