From fb56c14853ae9bb499d3d5283d45eeb218474214 Mon Sep 17 00:00:00 2001 From: Ivan Date: Sat, 21 Jan 2017 23:40:37 +0300 Subject: [PATCH] LLVM fix (skylake) (#2269) --- .travis.yml | 2 +- Utilities/JIT.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 19b4bd71dd..f25a7e161e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ dist: trusty os: - linux - - osx +# - osx osx_image: xcode6.4 diff --git a/Utilities/JIT.cpp b/Utilities/JIT.cpp index 264ba0d077..844b4ec7a5 100644 --- a/Utilities/JIT.cpp +++ b/Utilities/JIT.cpp @@ -245,13 +245,14 @@ jit_compiler::jit_compiler(std::unique_ptr&& _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(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)