llvm: update to 18

This commit is contained in:
oltolm 2024-03-10 12:56:16 +01:00 committed by Megamouse
parent 175aa510c8
commit c40826c140
3 changed files with 11 additions and 15 deletions

View file

@ -30,6 +30,7 @@ LOG_CHANNEL(jit_log, "JIT");
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#endif
#include <llvm/Support/CodeGen.h>
#include "llvm/Support/TargetSelect.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
@ -542,7 +543,11 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
.setErrorStr(&result)
.setEngineKind(llvm::EngineKind::JIT)
.setMCJITMemoryManager(std::move(mem))
#if LLVM_VERSION_MAJOR < 18
.setOptLevel(llvm::CodeGenOpt::Aggressive)
#else
.setOptLevel(llvm::CodeGenOptLevel::Aggressive)
#endif
.setCodeModel(flags & 0x2 ? llvm::CodeModel::Large : llvm::CodeModel::Small)
#ifdef __APPLE__
//.setCodeModel(llvm::CodeModel::Large)