From ced73ea5df306156e5383b438d6858e58b1479e5 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 17 Apr 2012 09:26:28 -0400 Subject: r600g: Add hooks for the LLVM shader compiler The LLVM backend can now be enabled for r600g by using the --enable-r600-llvm-compiler configure flag. If you configure with this flag, you can still use the default compiler by setting the envrionment variable R600_USE_LLVM=0 Reviewed-by: Alex Deucher --- src/gallium/drivers/r600/Makefile.am | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/gallium/drivers/r600/Makefile.am') diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am index 8acd36ac865..a567f07ac8d 100644 --- a/src/gallium/drivers/r600/Makefile.am +++ b/src/gallium/drivers/r600/Makefile.am @@ -15,3 +15,27 @@ AM_CFLAGS = \ libr600_a_SOURCES = \ $(C_SOURCES) + +if USE_R600_LLVM_COMPILER + +# This is a hack until we can move the backend into the LLVM project. +# We need to use mklib, because it splits up libradeon.a into object files +# so that we can link it with the r600 objects. +libr600_a_AR = $(top_srcdir)/bin/mklib -o r600 -static + +libr600_a_SOURCES += \ + $(LLVM_C_SOURCES) + +libr600_a_LIBADD = \ + $(top_srcdir)/src/gallium/drivers/radeon/libradeon.a + +AM_CFLAGS += \ + $(LLVM_CFLAGS) \ + -I$(top_srcdir)/src/gallium/drivers/radeon/ \ + -DR600_USE_LLVM + +AM_CXXFLAGS= \ + $(LLVM_CXXFLAGS) +else +libr600_a_AR = $(AR) $(ARFLAGS) +endif -- cgit v1.2.3