diff options
| author | gingerBill <bill@gingerbill.org> | 2018-07-29 20:56:09 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-07-29 20:56:09 +0100 |
| commit | a6fe656f21863d578c1c408f158ed5bc567a8f23 (patch) | |
| tree | ec29897fe4c51347cbaa7570fae644d8ebb3c8c2 /src/ir.cpp | |
| parent | dc5da7933aab94ca26718b35058559c19637229e (diff) | |
foreign import x {"foo.lib", "bar.lib"}
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 036727326..5c58b1a2b 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -1332,22 +1332,24 @@ void ir_add_foreign_library_path(irModule *m, Entity *e) { GB_ASSERT(e->kind == Entity_LibraryName); GB_ASSERT(e->flags & EntityFlag_Used); - String library_path = e->LibraryName.path; - if (library_path.len == 0) { - return; - } + for_array(i, e->LibraryName.paths) { + String library_path = e->LibraryName.paths[i]; + if (library_path.len == 0) { + continue; + } - for_array(path_index, m->foreign_library_paths) { - String path = m->foreign_library_paths[path_index]; -#if defined(GB_SYSTEM_WINDOWS) - if (str_eq_ignore_case(path, library_path)) { -#else - if (str_eq(path, library_path)) { -#endif - return; + for_array(path_index, m->foreign_library_paths) { + String path = m->foreign_library_paths[path_index]; + #if defined(GB_SYSTEM_WINDOWS) + if (str_eq_ignore_case(path, library_path)) { + #else + if (str_eq(path, library_path)) { + #endif + continue; + } } + array_add(&m->foreign_library_paths, library_path); } - array_add(&m->foreign_library_paths, library_path); } |