Module: Mesa Branch: main Commit: f79617fe804ea6524651ff1bc3a91098d3199179 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f79617fe804ea6524651ff1bc3a91098d3199179
Author: Marek Olšák <[email protected]> Date: Mon Sep 25 15:57:33 2023 -0400 amd/llvm: fix build with LLVM 18 Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25388> --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 5e7a30a6cc2..e213f7e4be1 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -366,7 +366,11 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, builder.setEngineKind(EngineKind::JIT) .setErrorStr(&Error) .setTargetOptions(options) +#if LLVM_VERSION_MAJOR >= 18 + .setOptLevel((CodeGenOptLevel)OptLevel); +#else .setOptLevel((CodeGenOpt::Level)OptLevel); +#endif #if DETECT_OS_WINDOWS /*
