From bb2db56ffec6e527d88751f75117ae690227cd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= Date: Sat, 11 Feb 2023 18:38:01 +0100 Subject: [PATCH] fix: gallivm: fix LLVM #include of Host.h, moved to TargetParser Upstream moved Host.h from Support to TargetParser in LLVM 17. This shouldn't lead to a FTBFS, since there is a forwarding include left behind. Sadly the added deprecation warning #pragma is invalid and thus causes a build failure right away. But since we would have to follow the move anyway in the future, just do it right away. Reference: https://github.com/llvm/llvm-project/commit/d768bf994f508d7eaf9541a568be3d71096febf5 Reviewed-by: Bas Nieuwenhuizen Closes: #8275 Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 7 ++++++- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index 54bc5d5ada3..f78f04f042b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -35,9 +35,14 @@ #include #include #include -#include #include +#if LLVM_VERSION_MAJOR >= 17 +#include +#else +#include +#endif + #include "util/u_math.h" #include "util/u_debug.h" diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 334c1353039..5e7a30a6cc2 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -59,16 +59,18 @@ #include #include #include -#include #include #include #include #if LLVM_VERSION_MAJOR >= 15 #include #endif + #if LLVM_VERSION_MAJOR >= 17 +#include #include #else +#include #include #endif