Mesa/u_fix-llvm19-build.patch
Stefan Dirsch 32006fba16 - Add u_fix-llvm19-build.patch to fix build with LLVM 19 on ARM.
- Update minimum version requirements based on meson.build.
- Fix build on s390x: apparently we don't have libvdpau_gallium.so.

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1329
2024-09-23 10:32:02 +00:00

18 lines
740 B
Diff

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index e5f4dfc829f..72e78e00ba4 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -329,8 +329,12 @@ lp_build_fill_mattrs(std::vector<std::string> &MAttrs)
* which allows us to enable/disable code generation based
* on the results of cpuid on these architectures.
*/
+#if LLVM_VERSION_MAJOR >= 19
+ llvm::StringMap<bool> features = llvm::sys::getHostCPUFeatures();
+#else
llvm::StringMap<bool> features;
llvm::sys::getHostCPUFeatures(features);
+#endif
for (llvm::StringMapIterator<bool> f = features.begin();
f != features.end();