aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_utility.cpp
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-07-02 15:28:08 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-07-02 15:28:08 +0200
commit6f1cc8071c3ff49c5431cc8ad078d12883f91545 (patch)
treed87348be99cb43cfbd830bedbfdc25aafdda6cc0 /src/llvm_backend_utility.cpp
parent5637ed9ecdd31929792c59a79d396d24b5bb0ee1 (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.cpp6
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);
}