Mesa/u_fix-llvm19-build.patch

18 lines
740 B
Diff
Raw Normal View History

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();