summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2023-09-25 15:57:33 -0400
committerMarge Bot <emma+marge@anholt.net>2023-09-26 05:45:17 +0000
commitf79617fe804ea6524651ff1bc3a91098d3199179 (patch)
tree0666b7654d6881f8fcfa010ee17f81b22609ac2a /src/gallium/auxiliary
parent6060b656f88f0fc71d3750cb29c2f3aaf2c1bd4c (diff)
downloadmesa-f79617fe804ea6524651ff1bc3a91098d3199179.tar.gz
mesa-f79617fe804ea6524651ff1bc3a91098d3199179.tar.bz2
mesa-f79617fe804ea6524651ff1bc3a91098d3199179.zip
amd/llvm: fix build with LLVM 18
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25388>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp4
1 files changed, 4 insertions, 0 deletions
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
/*