configure.ac: supersede --enable-gallium-llvm over --enable-llvm
Currently we have extra (somewhat questionable) modularity, such that one could build some parts with LLVM while others w/o. That is extremely fragile, error prone and requires quite noticable amount of code throughout. Thus lets deprecate the gallium toggle in faviour of the generic one. The former will throw a warning when set, and it will be overwritten by the latter. This will allow gradual transition w/o breaking people's scripts. v2: Rebase, document in release notes. Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tobias Droste <tdroste@gmx.de> (v1)
This commit is contained in:

committed by
Emil Velikov

parent
bdd6147e29
commit
b3b415609d
@@ -27,7 +27,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
|
|||||||
--enable-egl \
|
--enable-egl \
|
||||||
--enable-gallium-tests \
|
--enable-gallium-tests \
|
||||||
--enable-gallium-osmesa \
|
--enable-gallium-osmesa \
|
||||||
--enable-gallium-llvm \
|
--enable-llvm \
|
||||||
--enable-gbm \
|
--enable-gbm \
|
||||||
--enable-gles1 \
|
--enable-gles1 \
|
||||||
--enable-gles2 \
|
--enable-gles2 \
|
||||||
|
49
configure.ac
49
configure.ac
@@ -959,8 +959,8 @@ llvm_set_environment_variables() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require_llvm() {
|
require_llvm() {
|
||||||
if test "x$enable_gallium_llvm" != "xyes"; then
|
if test "x$enable_llvm" != "xyes"; then
|
||||||
AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
|
AC_MSG_ERROR([--enable-llvm is required when building $1])
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1717,30 +1717,41 @@ fi
|
|||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Gallium LLVM
|
dnl Gallium LLVM
|
||||||
dnl
|
dnl Deprecated: kept for backwards compatibility
|
||||||
dnl With follow-up commits we'll rework --enable-gallium-llvm to --enable-llvm
|
|
||||||
dnl Since that is too invasive to stable, do the more conservative thing for now
|
|
||||||
dnl and consider it as a global LLVM toggle.
|
|
||||||
dnl
|
dnl
|
||||||
AC_ARG_ENABLE([gallium-llvm],
|
AC_ARG_ENABLE([gallium-llvm],
|
||||||
[AS_HELP_STRING([--enable-gallium-llvm],
|
[AS_HELP_STRING([--enable-gallium-llvm],
|
||||||
[build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
|
[DEPRECATED: use --enable-llvm instead])],
|
||||||
[enable_gallium_llvm="$enableval"],
|
[enable_gallium_llvm="$enableval"],
|
||||||
[enable_gallium_llvm=auto])
|
[enable_gallium_llvm=auto])
|
||||||
|
|
||||||
if test "x$enable_gallium_llvm" = xauto; then
|
if test "x$enable_gallium_llvm" != xauto; then
|
||||||
|
AC_MSG_WARN([The --enable-gallium-llvm option has been deprecated. Use --enable-llvm instead.])
|
||||||
|
enable_llvm=$enable_gallium_llvm
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl LLVM
|
||||||
|
dnl
|
||||||
|
AC_ARG_ENABLE([llvm],
|
||||||
|
[AS_HELP_STRING([--enable-llvm],
|
||||||
|
[build with LLVM support @<:@default=enabled on x86/x86_64@:>@])],
|
||||||
|
[enable_llvm="$enableval"],
|
||||||
|
[enable_llvm=auto])
|
||||||
|
|
||||||
|
if test "x$enable_llvm" = xauto -a "x$FOUND_LLVM" = xyes; then
|
||||||
if test "x$FOUND_LLVM" = xyes; then
|
if test "x$FOUND_LLVM" = xyes; then
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
i*86|x86_64|amd64) enable_gallium_llvm=yes;;
|
i*86|x86_64|amd64) enable_llvm=yes;;
|
||||||
*) enable_gallium_llvm=no;;
|
*) enable_llvm=no;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
enable_gallium_llvm=no
|
enable_llvm=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_gallium_llvm" = xyes -a "x$FOUND_LLVM" = xno; then
|
if test "x$enable_llvm" = xyes -a "x$FOUND_LLVM" = xno; then
|
||||||
AC_MSG_ERROR([--enable-gallium-llvm selected but llvm-config is not found])
|
AC_MSG_ERROR([--enable-llvm selected but llvm-config is not found])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -2323,7 +2334,7 @@ if test -n "$with_gallium_drivers"; then
|
|||||||
;;
|
;;
|
||||||
xswrast)
|
xswrast)
|
||||||
HAVE_GALLIUM_SOFTPIPE=yes
|
HAVE_GALLIUM_SOFTPIPE=yes
|
||||||
if test "x$enable_gallium_llvm" = xyes; then
|
if test "x$enable_llvm" = xyes; then
|
||||||
HAVE_GALLIUM_LLVMPIPE=yes
|
HAVE_GALLIUM_LLVMPIPE=yes
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@@ -2369,7 +2380,7 @@ if test -n "$with_gallium_drivers"; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_gallium_llvm" = "xyes" -a "$with_gallium_drivers"; then
|
if test "x$enable_llvm" = "xyes" -a "$with_gallium_drivers"; then
|
||||||
llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"
|
llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"
|
||||||
llvm_add_default_components "gallium"
|
llvm_add_default_components "gallium"
|
||||||
fi
|
fi
|
||||||
@@ -2383,7 +2394,7 @@ fi
|
|||||||
dnl
|
dnl
|
||||||
dnl Set defines and buildtime variables only when using LLVM.
|
dnl Set defines and buildtime variables only when using LLVM.
|
||||||
dnl
|
dnl
|
||||||
if test "x$enable_gallium_llvm" = xyes; then
|
if test "x$enable_llvm" = xyes; then
|
||||||
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
|
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
|
||||||
|
|
||||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||||
@@ -2496,7 +2507,7 @@ AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$HAVE_GALLIUM_R300" = xyes -o \
|
|||||||
AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$enable_glx" = xgallium-xlib)
|
AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$enable_glx" = xgallium-xlib)
|
||||||
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
|
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
|
||||||
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
|
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
|
||||||
AM_CONDITIONAL(HAVE_GALLIUM_LLVM, test "x$enable_gallium_llvm" = xyes)
|
AM_CONDITIONAL(HAVE_GALLIUM_LLVM, test "x$enable_llvm" = xyes)
|
||||||
AM_CONDITIONAL(USE_VC4_SIMULATOR, test x$USE_VC4_SIMULATOR = xyes)
|
AM_CONDITIONAL(USE_VC4_SIMULATOR, test x$USE_VC4_SIMULATOR = xyes)
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes)
|
AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes)
|
||||||
@@ -2776,7 +2787,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
if test "x$enable_gallium_llvm" = xyes; then
|
if test "x$enable_llvm" = xyes; then
|
||||||
echo " llvm: yes"
|
echo " llvm: yes"
|
||||||
echo " llvm-config: $LLVM_CONFIG"
|
echo " llvm-config: $LLVM_CONFIG"
|
||||||
echo " llvm-version: $LLVM_VERSION"
|
echo " llvm-version: $LLVM_VERSION"
|
||||||
@@ -2823,7 +2834,7 @@ echo " CFLAGS: $cflags"
|
|||||||
echo " CXXFLAGS: $cxxflags"
|
echo " CXXFLAGS: $cxxflags"
|
||||||
echo " Macros: $defines"
|
echo " Macros: $defines"
|
||||||
echo ""
|
echo ""
|
||||||
if test "x$enable_gallium_llvm" = xyes; then
|
if test "x$enable_llvm" = xyes; then
|
||||||
echo " LLVM_CFLAGS: $LLVM_CFLAGS"
|
echo " LLVM_CFLAGS: $LLVM_CFLAGS"
|
||||||
echo " LLVM_CXXFLAGS: $LLVM_CXXFLAGS"
|
echo " LLVM_CXXFLAGS: $LLVM_CXXFLAGS"
|
||||||
echo " LLVM_CPPFLAGS: $LLVM_CPPFLAGS"
|
echo " LLVM_CPPFLAGS: $LLVM_CPPFLAGS"
|
||||||
|
@@ -354,7 +354,7 @@ Here is one solution that I've been using.
|
|||||||
--with-gallium-drivers=swrast \
|
--with-gallium-drivers=swrast \
|
||||||
--with-vulkan-drivers=intel \
|
--with-vulkan-drivers=intel \
|
||||||
--enable-llvm-shared-libs \
|
--enable-llvm-shared-libs \
|
||||||
--enable-gallium-llvm \
|
--enable-llvm \
|
||||||
--enable-glx-tls \
|
--enable-glx-tls \
|
||||||
--enable-gbm \
|
--enable-gbm \
|
||||||
--enable-egl \
|
--enable-egl \
|
||||||
|
@@ -55,6 +55,7 @@ Note: some of the new features are only available with certain drivers.
|
|||||||
<h2>Changes</h2>
|
<h2>Changes</h2>
|
||||||
|
|
||||||
<li>Removed the ilo gallium driver.</li>
|
<li>Removed the ilo gallium driver.</li>
|
||||||
|
<li>The configure option --enable-gallium-llvm is superseded by --enable-llvm.</li>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user