Android: fix build break from r600/radeon split
authorRob Herring <robh@kernel.org>
Tue, 10 Oct 2017 22:01:29 +0000 (17:01 -0500)
committerRob Herring <robh@kernel.org>
Wed, 11 Oct 2017 02:37:19 +0000 (21:37 -0500)
Commit 06bfb2d28f7a ("r600: fork and import gallium/radeon") broke the
Android build:

external/mesa3d/src/gallium/drivers/radeon/r600_pipe_common.c:43:10: fatal error: 'llvm-c/TargetMachine.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~~

Update the Android makefiles so that drivers/radeon is only built when
radeonsi (and therefore LLVM) is enabled.

Fixes: 06bfb2d28f7a (r600: fork and import gallium/radeon)
Acked-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Rob Herring <robh@kernel.org>
src/gallium/Android.mk
src/gallium/drivers/r600/Android.mk
src/gallium/drivers/radeon/Android.mk

index 8be365a550426ac17f0a2984d737d62c8d428c9e..6f93665365a8f81e69ba966d16beac645ae617c3 100644 (file)
@@ -40,7 +40,7 @@ SUBDIRS += winsys/i915/drm drivers/i915
 SUBDIRS += winsys/nouveau/drm drivers/nouveau
 SUBDIRS += winsys/pl111/drm drivers/pl111
 SUBDIRS += winsys/radeon/drm drivers/r300
-SUBDIRS += winsys/radeon/drm drivers/r600 drivers/radeon
+SUBDIRS += winsys/radeon/drm drivers/r600
 SUBDIRS += winsys/radeon/drm winsys/amdgpu/drm drivers/radeonsi drivers/radeon
 SUBDIRS += winsys/vc4/drm drivers/vc4
 SUBDIRS += winsys/virgl/drm winsys/virgl/vtest drivers/virgl
index 1683cfa09c9eed99306fd7e5c1c88bbc7b6023fa..9f684cf2445ef5af150f9e6e8ef9dd072cea4b3f 100644 (file)
@@ -45,6 +45,10 @@ $(intermediates)/egd_tables.h: $(MESA_TOP)/src/gallium/drivers/r600/egd_tables.p
        @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
        $(hide) $(MESA_PYTHON2) $(MESA_TOP)/src/gallium/drivers/r600/egd_tables.py $(MESA_TOP)/src/gallium/drivers/r600/evergreend.h > $@
 
+ifeq ($(MESA_ENABLE_LLVM),true)
+$(call mesa-build-with-llvm)
+endif
+
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
 
index c2d3a1cbce605eeb9e4aa345ab5c4fe8018ec0af..578ab0be91f92c554f7c624e72b0fc0589cd2d38 100644 (file)
@@ -41,7 +41,7 @@ endif
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
 
-ifneq ($(HAVE_GALLIUM_R600)$(HAVE_GALLIUM_RADEONSI),)
+ifneq ($(HAVE_GALLIUM_RADEONSI),)
 $(eval GALLIUM_LIBS += $(LOCAL_MODULE))
 $(eval GALLIUM_SHARED_LIBS += $(LOCAL_SHARED_LIBRARIES))
 endif