This makes radeon_llvm_checks use the new helper function, use the same ordering of arguments as llvm_check_version_for and adds the radv check to the Vulkan section.
Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 6f45e46..f1b00f1 100644 --- a/configure.ac +++ b/configure.ac @@ -1032,14 +1032,17 @@ radeon_llvm_check() { else amdgpu_llvm_target_name='amdgpu' fi - llvm_check_version_for $2 $3 $4 $1 - if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then - AC_MSG_ERROR([LLVM $amdgpu_llvm_target_name not enabled in your LLVM build.]) - fi - LLVM_COMPONENTS="${LLVM_COMPONENTS} $amdgpu_llvm_target_name bitreader ipo" + + llvm_check_version_for $* + + llvm_add_target $amdgpu_llvm_target_name $4 + llvm_add_component "bitreader" $4 + llvm_add_component "ipo" $4 + NEED_RADEON_LLVM=yes + if test "x$have_libelf" != xyes; then - AC_MSG_ERROR([$1 requires libelf when using llvm]) + AC_MSG_ERROR([$4 requires libelf when using llvm]) fi } @@ -1898,6 +1901,7 @@ if test -n "$with_vulkan_drivers"; then ;; xradeon) PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) + radeon_llvm_check "3" "9" "0" "radv" HAVE_RADEON_VULKAN=yes; if test "x$with_sha1" == "x"; then AC_MSG_ERROR([radv vulkan driver requires SHA1]) @@ -2505,7 +2509,7 @@ if test -n "$with_gallium_drivers"; then gallium_require_drm "Gallium R600" gallium_require_drm_loader if test "x$enable_opencl" = xyes; then - radeon_llvm_check "r600g" "3" "6" "0" + radeon_llvm_check "3" "6" "0" "r600g" gallium_require_llvm "r600" llvm_add_component "asmparser" "r600" fi @@ -2516,7 +2520,7 @@ if test -n "$with_gallium_drivers"; then PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) gallium_require_drm "radeonsi" gallium_require_drm_loader - radeon_llvm_check "radeonsi" "3" "6" "0" + radeon_llvm_check "3" "6" "0" "radeonsi" gallium_require_llvm "radeonsi" require_egl_drm "radeonsi" ;; @@ -2585,10 +2589,6 @@ if test -n "$with_gallium_drivers"; then done fi -if test "x$HAVE_RADEON_VULKAN" = "xyes"; then - radeon_llvm_check "radv" "3" "9" "0" -fi - dnl Set LLVM_LIBS - This is done after the driver configuration so dnl that drivers can add additional components to LLVM_COMPONENTS. dnl Previously, gallium drivers were updating LLVM_LIBS directly -- 2.10.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev