From: Emil Velikov <[email protected]>

Earlier refactoring commits changed from one, dare I say it, broken
behaviour to another. Namely:

Before, as you explicitly --enable-gallium-llvm your selection was
ignored when llvm-config was not present/detected.
Today, the "auto" heuristics enables gallium llvm regardless if you have
llvm/llvm-config available or not.

Rework the auto-detection to attribute for llvm's presence.

v2: Set enable_gallium_llvm=no when LLVM is not found.

Cc: Tobias Droste <[email protected]>
Cc: Samuel Pitoiset <[email protected]>
Cc: "17.0" <[email protected]>
Reported-by: Samuel Pitoiset <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Tobias Droste <[email protected]> (v1)
---
Samuel, v2 is a trivial change which should be a NFC.
If you want to test it over v1 fetch 
https://github.com/evelikov/Mesa/commits/rev3.1-llvm
---
 configure.ac | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 43ea9590ed..d42276aece 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1722,10 +1722,14 @@ AC_ARG_ENABLE([gallium-llvm],
     [enable_gallium_llvm=auto])
 
 if test "x$enable_gallium_llvm" = xauto; then
-    case "$host_cpu" in
-    i*86|x86_64|amd64) enable_gallium_llvm=yes;;
-    *) enable_gallium_llvm=no;;
-    esac
+    if test "x$FOUND_LLVM" = xyes; then
+        case "$host_cpu" in
+        i*86|x86_64|amd64) enable_gallium_llvm=yes;;
+        *) enable_gallium_llvm=no;;
+        esac
+    else
+        enable_gallium_llvm=no
+    fi
 fi
 
 if test "x$enable_gallium_llvm" = xyes -a "x$FOUND_LLVM" = xno; then
-- 
2.11.0

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to