[Mesa-dev] [PATCH] Fix build with --enable-gallium-llvm.

Chris Halse Rogers christopher.halse.rogers at canonical.com
Fri Jun 11 03:33:44 PDT 2010


From: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>

The es1, es2 and gl state trackers include draw_pipe.h, which includes
the llvm headers if MESA_LLVM is true, so we also need to add the
llvm seachpaths.

Similarly, gallivm and other gallium drivers need LLVM_CFLAGS to build when enabled
---
 src/gallium/Makefile.template |    3 +++
 src/mesa/Makefile             |    7 +++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/gallium/Makefile.template b/src/gallium/Makefile.template
index 1ba0724..fd46377 100644
--- a/src/gallium/Makefile.template
+++ b/src/gallium/Makefile.template
@@ -23,6 +23,9 @@ INCLUDES = \
 	-I$(TOP)/src/gallium/drivers \
 	$(LIBRARY_INCLUDES)
 
+ifeq ($(MESA_LLVM),1)
+LIBRARY_DEFINES += $(LLVM_CFLAGS)
+endif
 
 ##### TARGETS #####
 
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 4f81768..e314b6d 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -20,6 +20,13 @@ MESA_CPPFLAGS := $(API_DEFINES)
 ES1_CPPFLAGS := -DFEATURE_ES1=1
 ES2_CPPFLAGS := -DFEATURE_ES2=1
 
+ifeq ($(MESA_LLVM),1)
+MESA_CPPFLAGS += $(LLVM_CFLAGS)
+ES1_CPPFLAGS += $(LLVM_CFLAGS)
+ES2_CPPFLAGS += $(LLVM_CFLAGS)
+endif
+
+
 include sources.mak
 
 # adjust object dirs
-- 
1.7.1



More information about the mesa-dev mailing list