mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Correct _start export for wasm* targets
This commit is contained in:
@@ -897,6 +897,11 @@ lbProcedure *lb_create_main_procedure(lbModule *m, lbProcedure *startup_runtime)
|
|||||||
|
|
||||||
if (is_arch_wasm()) {
|
if (is_arch_wasm()) {
|
||||||
LLVMSetLinkage(p->value, LLVMDLLExportLinkage);
|
LLVMSetLinkage(p->value, LLVMDLLExportLinkage);
|
||||||
|
LLVMSetDLLStorageClass(p->value, LLVMDLLExportStorageClass);
|
||||||
|
LLVMSetVisibility(p->value, LLVMDefaultVisibility);
|
||||||
|
|
||||||
|
char const *export_name = alloc_cstring(permanent_allocator(), p->name);
|
||||||
|
LLVMAddTargetDependentFunctionAttr(p->value, "wasm-export-name", export_name);
|
||||||
} else {
|
} else {
|
||||||
LLVMSetLinkage(p->value, LLVMExternalLinkage);
|
LLVMSetLinkage(p->value, LLVMExternalLinkage);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user