Make the link order of foreign imports deterministic

This commit is contained in:
gingerBill
2022-05-04 16:04:26 +01:00
parent dc323cfa1d
commit cec049b7d3
6 changed files with 381 additions and 311 deletions
+4 -1
View File
@@ -135,7 +135,6 @@ struct lbModule {
u32 nested_type_name_guid;
Array<lbProcedure *> procedures_to_generate;
Array<String> foreign_library_paths;
lbProcedure *curr_procedure;
@@ -162,6 +161,10 @@ struct lbGenerator {
PtrMap<Ast *, lbProcedure *> anonymous_proc_lits;
BlockingMutex foreign_mutex;
PtrSet<Entity *> foreign_libraries_set;
Array<Entity *> foreign_libraries;
std::atomic<u32> global_array_index;
std::atomic<u32> global_generated_index;
};