OSDN Git Service

gallium/auxiliary: don't build NIR sources with MSVC2008 flags
authorConnor Abbott <cwabbott0@gmail.com>
Sun, 20 Dec 2015 16:42:56 +0000 (11:42 -0500)
committerConnor Abbott <cwabbott0@gmail.com>
Thu, 24 Dec 2015 01:46:48 +0000 (20:46 -0500)
NIR has never been built with MSVC2008, so we shouldn't add
MSVC2008_COMPAT_CFLAGS to anything that uses it. This allows us to get
rid of the pragma in tgsi_to_nir.c.

Build tested with freedreno.

v2: Use MSVC2013_COMPAT_CLFAGS instead.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
src/gallium/auxiliary/Makefile.am
src/gallium/auxiliary/nir/tgsi_to_nir.c

index 7b026b5..bcdf297 100644 (file)
@@ -1,11 +1,10 @@
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-noinst_LTLIBRARIES = libgallium.la
+noinst_LTLIBRARIES = libgallium_nir.la
 
 AM_CFLAGS = \
        -I$(top_srcdir)/src/loader \
-       -I$(top_builddir)/src/glsl/nir \
        -I$(top_srcdir)/src/gallium/auxiliary/util \
        $(GALLIUM_CFLAGS) \
        $(VISIBILITY_CFLAGS) \
@@ -15,11 +14,24 @@ AM_CXXFLAGS = \
        $(VISIBILITY_CXXFLAGS) \
        $(MSVC2008_COMPAT_CXXFLAGS)
 
+libgallium_nir_la_SOURCES = \
+       $(NIR_SOURCES)
+
+libgallium_nir_la_CFLAGS = \
+       -I$(top_builddir)/src/glsl/nir \
+       $(GALLIUM_CFLAGS) \
+       $(VISIBILITY_CFLAGS) \
+       $(MSVC2013_COMPAT_CFLAGS)
+
+noinst_LTLIBRARIES += libgallium.la
+
 libgallium_la_SOURCES = \
        $(C_SOURCES) \
-       $(NIR_SOURCES) \
        $(GENERATED_SOURCES)
 
+libgallium_la_LIBADD = \
+       libgallium_nir.la
+
 if HAVE_MESA_LLVM
 
 AM_CFLAGS += \
index 56476d4..2cb723c 100644 (file)
  * IN THE SOFTWARE.
  */
 
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
-#endif
-
 #include "util/ralloc.h"
 #include "glsl/nir/nir.h"
 #include "glsl/nir/nir_control_flow.h"