From: Nicolai Hähnle <nicolai.haeh...@amd.com> At least when LLVM is used, which is basically always (unless you're only building r600 without OpenCL). --- src/Makefile.am | 5 ++++- src/amd/common/Makefile.am | 6 ++++++ src/amd/common/Makefile.sources | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 1347120..630409c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -71,20 +71,24 @@ osmesadir = $(includedir)/GL osmesa_HEADERS = $(top_srcdir)/include/GL/osmesa.h endif # include only conditionally ? SUBDIRS += compiler if HAVE_AMD_DRIVERS SUBDIRS += amd endif +if NEED_RADEON_LLVM +SUBDIRS += amd/common +endif + if HAVE_INTEL_DRIVERS SUBDIRS += intel endif if NEED_OPENGL_COMMON SUBDIRS += mesa endif SUBDIRS += loader @@ -119,21 +123,20 @@ if HAVE_VULKAN_COMMON SUBDIRS += vulkan/wsi endif ## Requires the i965 compiler (part of mesa) and wayland-drm if HAVE_INTEL_VULKAN SUBDIRS += intel/vulkan endif # Requires wayland-drm if HAVE_RADEON_VULKAN -SUBDIRS += amd/common SUBDIRS += amd/vulkan endif if HAVE_GALLIUM SUBDIRS += gallium endif EXTRA_DIST = \ getopt hgl SConscript \ $(top_srcdir)/include/GL/mesa_glinterop.h diff --git a/src/amd/common/Makefile.am b/src/amd/common/Makefile.am index 788152d..bc269ab 100644 --- a/src/amd/common/Makefile.am +++ b/src/amd/common/Makefile.am @@ -42,10 +42,16 @@ AM_CFLAGS = $(VISIBILITY_CFLAGS) \ $(LLVM_CFLAGS) \ $(LIBELF_CFLAGS) AM_CXXFLAGS = \ $(VISIBILITY_CXXFLAGS) \ $(LLVM_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 diff --git a/src/amd/common/Makefile.sources b/src/amd/common/Makefile.sources index 380dba0..0aff73b 100644 --- a/src/amd/common/Makefile.sources +++ b/src/amd/common/Makefile.sources @@ -17,13 +17,15 @@ # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. AMD_COMPILER_SOURCES := \ ac_binary.c \ 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 -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev