Skip to content

Commit 1daa1d1

Browse files
committed
Set LLVMInternalLinkage for aot_internal_func only when target is not Xtensa in XIP mode
1 parent 9500937 commit 1daa1d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/iwasm/compilation/aot_llvm.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,9 @@ aot_add_llvm_func(AOTCompContext *comp_ctx, LLVMModuleRef module,
776776
}
777777

778778
if (need_precheck) {
779-
if (!comp_ctx->is_jit_mode && !comp_ctx->is_indirect_mode)
779+
if (!comp_ctx->is_jit_mode
780+
&& (!comp_ctx->is_indirect_mode
781+
&& !strncmp(comp_ctx->target_arch, "xtensa", 6)))
780782
LLVMSetLinkage(func, LLVMInternalLinkage);
781783
unsigned int kind =
782784
LLVMGetEnumAttributeKindForName("noinline", strlen("noinline"));

0 commit comments

Comments
 (0)