Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions core/iwasm/compilation/aot_llvm_extra2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ LLVMCreateTargetMachineWithOpts(LLVMTargetRef ctarget, const char *triple,
auto cm = convert(code_model, &jit);
auto targetmachine = target->createTargetMachine(triple, cpu, features,
opts, rm, cm, ol, jit);
#if LLVM_VERSION_MAJOR >= 18
// always place data in normal data section.
//
// note that:
// - our aot file emitter/loader doesn't support x86-64 large data
// sections. (eg .lrodata)
// - for our purposes, "data" is usually something the compiler
// generated. (eg. jump tables) we probably never benefit from
// large data sections.
targetmachine->setLargeDataThreshold(UINT64_MAX);
#endif
return reinterpret_cast<LLVMTargetMachineRef>(targetmachine);
}

Expand Down
Loading