From 41c9a2e740a3b4139d0ef8c86b2378b9fe2a9215 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Mon, 10 Aug 2020 16:35:25 +0200 Subject: [PATCH] android: pan/mdg: Separate disassembler and compiler targets 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 Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/targets/dri/Android.mk | 1 + src/panfrost/Android.midgard.mk | 28 +++++++++++++++++++++++++++- src/panfrost/Makefile.sources | 7 +++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk index 9270ec147d7..8e4e202dde1 100644 --- a/src/gallium/targets/dri/Android.mk +++ b/src/gallium/targets/dri/Android.mk @@ -64,6 +64,7 @@ LOCAL_STATIC_LIBRARIES += \ libpanfrost_bifrost \ libpanfrost_lib \ libpanfrost_midgard \ + libpanfrost_midgard_disasm \ libpanfrost_shared \ libpanfrost_util \ diff --git a/src/panfrost/Android.midgard.mk b/src/panfrost/Android.midgard.mk index 1b3932a87d4..b192e9b311e 100644 --- a/src/panfrost/Android.midgard.mk +++ b/src/panfrost/Android.midgard.mk @@ -18,6 +18,31 @@ # 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) diff --git a/src/panfrost/Makefile.sources b/src/panfrost/Makefile.sources index 0eda6acfb06..19437f39b3c 100644 --- a/src/panfrost/Makefile.sources +++ b/src/panfrost/Makefile.sources @@ -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 \ -- 2.30.2