android: pan/mdg: Separate disassembler and compiler targets
authorMauro Rossi <issor.oruam@gmail.com>
Mon, 10 Aug 2020 14:35:25 +0000 (16:35 +0200)
committerMauro Rossi <issor.oruam@gmail.com>
Mon, 10 Aug 2020 19:35:31 +0000 (21:35 +0200)
Fixes the following building errors:

ld.lld: error: undefined symbol: mir_print_constant_component
>>> referenced by disassemble.c:356 (external/mesa/src/panfrost/midgard/disassemble.c:356)
...
ld.lld: error: undefined symbol: mir_print_constant_component
>>> referenced by disassemble.c:416 (external/mesa/src/panfrost/midgard/disassemble.c:416)

Fixes: b792d613e ("pan/mdg: Separate disassembler and compiler targets")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>

src/gallium/targets/dri/Android.mk
src/panfrost/Android.midgard.mk
src/panfrost/Makefile.sources

index 9270ec147d711959d2046b9be86dea8a80f3dd87..8e4e202dde11f7961b7bec6d431d7187d218b1b3 100644 (file)
@@ -64,6 +64,7 @@ LOCAL_STATIC_LIBRARIES += \
        libpanfrost_bifrost \
        libpanfrost_lib \
        libpanfrost_midgard \
+       libpanfrost_midgard_disasm \
        libpanfrost_shared \
        libpanfrost_util \
 
index 1b3932a87d49e779998d584fdd929c5f7d89f5cc..b192e9b311e475fafb1e275609b4013cbb25201f 100644 (file)
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+# build libpanfrost_midgard_disasm
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libpanfrost_midgard_disasm
+
+LOCAL_SRC_FILES := \
+       $(midgard_disasm_FILES)
+
+LOCAL_C_INCLUDES := \
+       $(MESA_TOP)/include \
+       $(MESA_TOP)/src/compiler/nir/ \
+       $(MESA_TOP)/src/gallium/auxiliary/ \
+       $(MESA_TOP)/src/gallium/include/ \
+       $(MESA_TOP)/src/mapi/ \
+       $(MESA_TOP)/src/mesa/ \
+       $(MESA_TOP)/src/panfrost/include/ \
+       $(MESA_TOP)/src/panfrost/midgard/
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := \
+       $(MESA_TOP)/src/panfrost/midgard/ \
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
+
+# build libpanfrost_midgard
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := libpanfrost_midgard
@@ -46,6 +71,7 @@ LOCAL_STATIC_LIBRARIES := \
        libmesa_nir \
        libmesa_st_mesa \
        libpanfrost_util \
+       libpanfrost_midgard_disasm
 
 midgard_nir_algebraic_gen := $(LOCAL_PATH)/midgard/midgard_nir_algebraic.py
 midgard_nir_algebraic_deps := \
@@ -59,4 +85,4 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
        $(MESA_TOP)/src/panfrost/midgard/ \
 
 include $(MESA_COMMON_MK)
-include $(BUILD_STATIC_LIBRARY)
\ No newline at end of file
+include $(BUILD_STATIC_LIBRARY)
index 0eda6acfb06e0472c36ff38fc7096a52a5d9f8b8..19437f39b3c32b6348d018976327f960aee72048 100644 (file)
@@ -74,6 +74,13 @@ midgard_FILES := \
         midgard/nir_undef_to_zero.c \
         midgard/nir_fuse_io_16.c \
 
+midgard_disasm_FILES := \
+        midgard/disassemble.c \
+        midgard/disassemble.h \
+        midgard/midgard_ops.c \
+        midgard/midgard_ops.h \
+        midgard/midgard_print_constant.c
+
 shared_FILES := \
         shared/pan_minmax_cache.c \
         shared/pan_tiling.c \