mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-16 04:09:07 +00:00
[Build] Explicit Triple with LLVM 21.1.0
This commit is contained in:
parent
1c0fa2ad58
commit
41a122a266
@ -658,7 +658,11 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
|
|||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
auto null_mod = std::make_unique<llvm::Module> ("null_", *m_context);
|
auto null_mod = std::make_unique<llvm::Module> ("null_", *m_context);
|
||||||
|
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
|
||||||
|
null_mod->setTargetTriple(llvm::Triple(jit_compiler::triple1()));
|
||||||
|
#else
|
||||||
null_mod->setTargetTriple(jit_compiler::triple1());
|
null_mod->setTargetTriple(jit_compiler::triple1());
|
||||||
|
#endif
|
||||||
|
|
||||||
std::unique_ptr<llvm::RTDyldMemoryManager> mem;
|
std::unique_ptr<llvm::RTDyldMemoryManager> mem;
|
||||||
|
|
||||||
@ -672,7 +676,11 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
mem = std::make_unique<MemoryManager2>(std::move(symbols_cement));
|
mem = std::make_unique<MemoryManager2>(std::move(symbols_cement));
|
||||||
|
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
|
||||||
|
null_mod->setTargetTriple(llvm::Triple(jit_compiler::triple2()));
|
||||||
|
#else
|
||||||
null_mod->setTargetTriple(jit_compiler::triple2());
|
null_mod->setTargetTriple(jit_compiler::triple2());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -5803,7 +5803,11 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module<lv2_obj>& module
|
|||||||
std::unique_ptr<Module> _module = std::make_unique<Module>(obj_name, jit.get_context());
|
std::unique_ptr<Module> _module = std::make_unique<Module>(obj_name, jit.get_context());
|
||||||
|
|
||||||
// Initialize target
|
// Initialize target
|
||||||
|
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
|
||||||
|
_module->setTargetTriple(Triple(jit_compiler::triple1()));
|
||||||
|
#else
|
||||||
_module->setTargetTriple(jit_compiler::triple1());
|
_module->setTargetTriple(jit_compiler::triple1());
|
||||||
|
#endif
|
||||||
_module->setDataLayout(jit.get_engine().getTargetMachine()->createDataLayout());
|
_module->setDataLayout(jit.get_engine().getTargetMachine()->createDataLayout());
|
||||||
|
|
||||||
// Initialize translator
|
// Initialize translator
|
||||||
|
|||||||
@ -1598,7 +1598,11 @@ public:
|
|||||||
|
|
||||||
// Create LLVM module
|
// Create LLVM module
|
||||||
std::unique_ptr<Module> _module = std::make_unique<Module>(m_hash + ".obj", m_context);
|
std::unique_ptr<Module> _module = std::make_unique<Module>(m_hash + ".obj", m_context);
|
||||||
|
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
|
||||||
|
_module->setTargetTriple(Triple(jit_compiler::triple2()));
|
||||||
|
#else
|
||||||
_module->setTargetTriple(jit_compiler::triple2());
|
_module->setTargetTriple(jit_compiler::triple2());
|
||||||
|
#endif
|
||||||
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
|
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
|
||||||
m_module = _module.get();
|
m_module = _module.get();
|
||||||
|
|
||||||
@ -2873,7 +2877,11 @@ public:
|
|||||||
|
|
||||||
// Create LLVM module
|
// Create LLVM module
|
||||||
std::unique_ptr<Module> _module = std::make_unique<Module>("spu_interpreter.obj", m_context);
|
std::unique_ptr<Module> _module = std::make_unique<Module>("spu_interpreter.obj", m_context);
|
||||||
|
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
|
||||||
|
_module->setTargetTriple(Triple(jit_compiler::triple2()));
|
||||||
|
#else
|
||||||
_module->setTargetTriple(jit_compiler::triple2());
|
_module->setTargetTriple(jit_compiler::triple2());
|
||||||
|
#endif
|
||||||
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
|
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
|
||||||
m_module = _module.get();
|
m_module = _module.get();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user