Commit 082f6d75 authored by Tim Rowley's avatar Tim Rowley

gallium/swr: confine c++11 flag to swr driver

On the philosophy that a driver shouldn't change the compile flags
for the entire tree, take the clove approach of moving the c++11 flag
to the swr driver directory.
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
parent ee72fec9
......@@ -2265,14 +2265,19 @@ if test -n "$with_gallium_drivers"; then
fi
;;
xswr)
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
swr_llvm_check "swr"
AC_MSG_CHECKING([whether $CXX supports AVX/AVX2])
AC_MSG_CHECKING([whether $CXX supports c++11/AVX/AVX2])
AVX_CXXFLAGS="-march=core-avx-i"
AVX2_CXXFLAGS="-march=core-avx2"
AC_LANG_PUSH([C++])
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="-std=c++11 $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
[AC_MSG_ERROR([c++11 compiler support not detected])])
CXXFLAGS="$save_CXXFLAGS"
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$AVX_CXXFLAGS $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
......
This diff is collapsed.
......@@ -22,7 +22,7 @@
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CXXFLAGS = $(GALLIUM_DRIVER_CFLAGS)
AM_CXXFLAGS = $(GALLIUM_DRIVER_CFLAGS) -std=c++11
noinst_LTLIBRARIES = libmesaswr.la
......@@ -30,7 +30,8 @@ libmesaswr_la_SOURCES = $(LOADER_SOURCES)
COMMON_CXXFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
$(LLVM_CFLAGS) \
$(LLVM_CXXFLAGS) \
-std=c++11 \
-I$(builddir)/rasterizer/scripts \
-I$(builddir)/rasterizer/jitter \
-I$(srcdir)/rasterizer \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment