diff options
| author | gingerBill <bill@gingerbill.org> | 2021-05-03 15:26:40 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-05-03 15:26:40 +0100 |
| commit | b44a56118effd721c164f5c1cb783d3d39958115 (patch) | |
| tree | 3305389f23ed7cbd81849654802eeffd5f870bcf /src/main.cpp | |
| parent | 0d044eabacde5910ef10dd18dca6d471fea0a9f2 (diff) | |
Begin cleanup for allowing for multiple LLVM modules
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index abc90d627..0a38d3496 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -218,8 +218,19 @@ i32 linker_stage(lbGenerator *gen) { add_path(find_result.vs_library_path); } - for_array(i, gen->module.foreign_library_paths) { - String lib = gen->module.foreign_library_paths[i]; + for_array(j, gen->modules.entries) { + lbModule *m = gen->modules.entries[j].value; + for_array(i, m->foreign_library_paths) { + String lib = m->foreign_library_paths[i]; + GB_ASSERT(lib.len < gb_count_of(lib_str_buf)-1); + isize len = gb_snprintf(lib_str_buf, gb_size_of(lib_str_buf), + " \"%.*s\"", LIT(lib)); + lib_str = gb_string_appendc(lib_str, lib_str_buf); + } + } + + for_array(i, gen->default_module.foreign_library_paths) { + String lib = gen->default_module.foreign_library_paths[i]; GB_ASSERT(lib.len < gb_count_of(lib_str_buf)-1); isize len = gb_snprintf(lib_str_buf, gb_size_of(lib_str_buf), " \"%.*s\"", LIT(lib)); |