More information at https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16325
Signed-off-by: Marcel Ziswiler <[email protected]> --- ...gallivm-adapt-for-JITLink-in-LLVM-23.patch | 51 +++++++++++++++++++ meta/recipes-graphics/mesa/mesa.inc | 1 + 2 files changed, 52 insertions(+) create mode 100644 meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch diff --git a/meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch b/meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch new file mode 100644 index 000000000000..756b68a898e3 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch @@ -0,0 +1,51 @@ +From cda383625f5d1fd06657fb998b7d1370a7fabd8f Mon Sep 17 00:00:00 2001 +Message-ID: <cda383625f5d1fd06657fb998b7d1370a7fabd8f.1791114851.git.mar...@ziswiler.com> +From: Icenowy Zheng <[email protected]> +Date: Wed, 30 Sep 2026 14:10:14 +0800 +Subject: [PATCH] gallivm: adapt for JITLink in LLVM 23 + +In LLVM 23, the ObjectLinkingLayerCreator callback now takes an +additional memory manager argument. + +Adapt for this API change. + +This argument eliminates the need to create a InProcessMemoryManager +by ourselves so a dedicated implementation is added. + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16325 +Signed-off-by: Icenowy Zheng <[email protected]> + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16325] +--- + src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp +index 09d56e543ee..bc9d7837ecd 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp +@@ -346,6 +346,13 @@ LPJit::LPJit() :jit_dylib_count(0) { + .setJITTargetMachineBuilder(std::move(JTMB)) + #ifdef USE_JITLINK + .setObjectLinkingLayerCreator( ++#if LLVM_VERSION_MAJOR >= 23 ++ /* LLVM 23 added a JITLinkMemoryManager argument, use it as our ++ * JITLinkMemoryManager. */ ++ [&](ExecutionSession &ES, llvm::jitlink::JITLinkMemoryManager &MM) { ++ return std::make_unique<ObjectLinkingLayer>(ES, MM); ++ }) ++#else + #if LLVM_VERSION_MAJOR >= 21 + /* LLVM 21 removed the Triple argument */ + [&](ExecutionSession &ES) { +@@ -355,6 +362,7 @@ LPJit::LPJit() :jit_dylib_count(0) { + return std::make_unique<ObjectLinkingLayer>( + ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create())); + }) ++#endif + #else + #if LLVM_USE_INTEL_JITEVENTS + .RegisterJITEventListener( +-- +2.52.0 + diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index b0ae5016de1a..da71a0bdb0d4 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -20,6 +20,7 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ file://0001-src-intel-compiler-jay-jay_ir.h-do-not-used-typed-en.patch \ file://0001-src-util-u_math.c-do-not-use-arm-fpu-instructions-if.patch \ file://0001-addrlib-avoid-builtin_cpu_supports-for-avx2-detecti.patch \ + file://0001-gallivm-adapt-for-JITLink-in-LLVM-23.patch \ " SRC_URI[sha256sum] = "bce5f7fbebb934373b86c999a064d52fb5065878dc57f287f95346648ec832e9" -- 2.53.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#247261): https://lists.openembedded.org/g/openembedded-core/message/247261 Mute This Topic: https://lists.openembedded.org/mt/121599194/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
