mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 20:02:22 -07:00
Make the link order of foreign imports deterministic
This commit is contained in:
@@ -67,9 +67,7 @@ void lb_init_module(lbModule *m, Checker *c) {
|
||||
map_init(&m->equal_procs, a);
|
||||
map_init(&m->hasher_procs, a);
|
||||
array_init(&m->procedures_to_generate, a, 0, 1024);
|
||||
array_init(&m->foreign_library_paths, a, 0, 1024);
|
||||
array_init(&m->missing_procedures_to_check, a, 0, 16);
|
||||
|
||||
map_init(&m->debug_values, a);
|
||||
array_init(&m->debug_incomplete_types, a, 0, 1024);
|
||||
|
||||
@@ -126,6 +124,11 @@ bool lb_init_generator(lbGenerator *gen, Checker *c) {
|
||||
map_init(&gen->modules_through_ctx, permanent_allocator(), gen->info->packages.entries.count*2);
|
||||
map_init(&gen->anonymous_proc_lits, heap_allocator(), 1024);
|
||||
|
||||
|
||||
mutex_init(&gen->foreign_mutex);
|
||||
array_init(&gen->foreign_libraries, heap_allocator(), 0, 1024);
|
||||
ptr_set_init(&gen->foreign_libraries_set, heap_allocator(), 1024);
|
||||
|
||||
if (USE_SEPARATE_MODULES) {
|
||||
for_array(i, gen->info->packages.entries) {
|
||||
AstPackage *pkg = gen->info->packages.entries[i].value;
|
||||
|
||||
Reference in New Issue
Block a user