Skip to content

Commit

Permalink
fix GenCodeOptLevel vs GenCodeOpt (#1497)
Browse files Browse the repository at this point in the history
* fix GenCodeOptLevel vs GenCodeOpt

ref #1496

* Update Compiler.cpp

Add statement depending on LLVM version
  • Loading branch information
dave2309 authored Dec 19, 2023
1 parent 3602563 commit a86d995
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/score-plugin-jit/JitCpp/Compiler/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ static std::unique_ptr<llvm::orc::LLJIT> jitBuilder()
SCORE_ASSERT(JTMB);

llvm::orc::LLJITBuilder builder;

#if LLVM_VERSION_MAJOR < 18
JTMB->setCodeGenOptLevel(llvm::CodeGenOpt::Aggressive);
#else
JTMB->setCodeGenOptLevel(llvm::CodeGenOptLevel::Aggressive);
#endif

setTargetOptions(JTMB->getOptions());

builder.setJITTargetMachineBuilder(std::move(*JTMB));
Expand Down

0 comments on commit a86d995

Please sign in to comment.