amd/common: build also for gallium drivers
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 31 Oct 2016 10:56:09 +0000 (11:56 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 3 Nov 2016 09:06:24 +0000 (10:06 +0100)
At least when LLVM is used, which is basically always (unless you're only
building r600 without OpenCL).

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/Makefile.am
src/amd/common/Makefile.am
src/amd/common/Makefile.sources

index 1347120f186befc5ad046c099c3769a058daf93d..630409c822b46486e62111cac5590032efbf6960 100644 (file)
@@ -78,6 +78,10 @@ if HAVE_AMD_DRIVERS
 SUBDIRS += amd
 endif
 
+if NEED_RADEON_LLVM
+SUBDIRS += amd/common
+endif
+
 if HAVE_INTEL_DRIVERS
 SUBDIRS += intel
 endif
@@ -126,7 +130,6 @@ endif
 
 # Requires wayland-drm
 if HAVE_RADEON_VULKAN
-SUBDIRS += amd/common
 SUBDIRS += amd/vulkan
 endif
 
index 788152d850c2cfcf54e61c450fa0d9b76e423659..bc269abe7559bafa8cace01d1a3eb457ff9c6489 100644 (file)
@@ -49,3 +49,9 @@ AM_CXXFLAGS = \
 noinst_LTLIBRARIES = libamd_common.la
 
 libamd_common_la_SOURCES = $(AMD_COMPILER_SOURCES)
+
+# nir_to_llvm requires LLVM 3.9, which is only required as a minimum when
+# radv is built.
+if HAVE_RADEON_VULKAN
+libamd_common_la_SOURCES += $(AMD_NIR_SOURCES)
+endif
index 380dba08621da52defc0f7b0d2e6b3810cdc3991..0aff73be776ea37122871bc853921dba902566c9 100644 (file)
@@ -24,6 +24,8 @@ AMD_COMPILER_SOURCES := \
        ac_binary.h \
        ac_llvm_helper.cpp \
        ac_llvm_util.c \
-       ac_llvm_util.h \
+       ac_llvm_util.h
+
+AMD_NIR_SOURCES := \
        ac_nir_to_llvm.c \
        ac_nir_to_llvm.h