diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-02 15:28:08 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-02 15:28:08 +0200 |
| commit | 6f1cc8071c3ff49c5431cc8ad078d12883f91545 (patch) | |
| tree | d87348be99cb43cfbd830bedbfdc25aafdda6cc0 /src/llvm_backend_utility.cpp | |
| parent | 5637ed9ecdd31929792c59a79d396d24b5bb0ee1 (diff) | |
wasm: add foreign import and linking of wasm object files
Diffstat (limited to 'src/llvm_backend_utility.cpp')
| -rw-r--r-- | src/llvm_backend_utility.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp index 98ed0c57e..1165476be 100644 --- a/src/llvm_backend_utility.cpp +++ b/src/llvm_backend_utility.cpp @@ -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); } |