wasm: add foreign import and linking of wasm object files

This commit is contained in:
Laytan Laats
2024-07-02 15:28:08 +02:00
parent 5637ed9ecd
commit 6f1cc8071c
6 changed files with 26 additions and 16 deletions
+5 -1
View File
@@ -2029,7 +2029,11 @@ gb_internal void lb_set_wasm_procedure_import_attributes(LLVMValueRef value, Ent
GB_ASSERT(foreign_library->LibraryName.paths.count == 1);
module_name = foreign_library->LibraryName.paths[0];
if (string_ends_with(module_name, str_lit(".o"))) {
return;
}
if (string_starts_with(import_name, module_name)) {
import_name = substring(import_name, module_name.len+WASM_MODULE_NAME_SEPARATOR.len, import_name.len);
}