LLVM fix (skylake) (#2269)

This commit is contained in:
Ivan 2017-01-21 23:40:37 +03:00 committed by GitHub
parent fbf8231642
commit fb56c14853
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@ dist: trusty
os:
- linux
- osx
# - osx
osx_image: xcode6.4

View File

@ -245,13 +245,14 @@ jit_compiler::jit_compiler(std::unique_ptr<llvm::Module>&& _module, std::unorder
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
LLVMLinkInMCJIT();
const auto _cpu = llvm::sys::getHostCPUName();
m_engine.reset(llvm::EngineBuilder(std::move(_module))
.setErrorStr(&result)
.setMCJITMemoryManager(std::make_unique<MemoryManager>(std::move(table)))
.setOptLevel(llvm::CodeGenOpt::Aggressive)
.setCodeModel((u64)s_memory <= 0x60000000 ? llvm::CodeModel::Small : llvm::CodeModel::Large) // TODO
.setMCPU(llvm::sys::getHostCPUName())
.setMCPU(_cpu == "skylake" ? "haswell" : _cpu)
.create());
if (!m_engine)