android: ac/debug: move sid_tables.h generation and IB decode to amd/common
authorMauro Rossi <issor.oruam@gmail.com>
Thu, 12 Jan 2017 00:14:12 +0000 (01:14 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 18 Jan 2017 16:28:59 +0000 (16:28 +0000)
This patch is the porting to android of the following commits:

b838f64 "ac/debug: Move sid_tables.h generation to common code."
0ef1b4d "ac/debug: Move IB decode to common code."

Fixes android building errors due to sid_tables.h
and ac_debug.c, ac_debug.h moved to amd/common

Tested by building nougat-x86

Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
src/amd/Android.common.mk
src/gallium/drivers/radeonsi/Android.mk

index 8dcb42fb438842b636c813e495fb039cbd4803e8..dfa7e59e9a2cfe1ccb646cc39cbbadf77e010a18 100644 (file)
@@ -28,16 +28,30 @@ include $(CLEAR_VARS)
 
 LOCAL_MODULE := libmesa_amd_common
 
-LOCAL_SRC_FILES := $(AMD_COMPILER_FILES)
+LOCAL_SRC_FILES := \
+       $(AMD_COMPILER_FILES) \
+       $(AMD_DEBUG_FILES)
 
 LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU   # instructs LLVM to declare LLVMInitializeAMDGPU* functions
 
+# generate sources
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+intermediates := $(call local-generated-sources-dir)
+LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(AMD_GENERATED_FILES))
+
+$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
+$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
+
+$(intermediates)/common/sid_tables.h: $(LOCAL_PATH)/common/sid_tables.py $(MESA_TOP)/src/amd/common/sid.h
+       $(transform-generated-source)
+
 LOCAL_C_INCLUDES := \
        $(MESA_TOP)/include \
        $(MESA_TOP)/src \
        $(MESA_TOP)/src/amd/common \
        $(MESA_TOP)/src/gallium/include \
        $(MESA_TOP)/src/gallium/auxiliary \
+       $(intermediates)/common \
        external/llvm/include \
        external/llvm/device/include \
        external/libcxx/include \
index b32c8dc3978fcc7d6a2ce6da29ae6e53be5c8047..d8bc990de4bcf6724b3eb5c57900b9987b41e26e 100644 (file)
@@ -32,21 +32,12 @@ LOCAL_SRC_FILES := $(C_SOURCES)
 
 LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU   # instructs LLVM to declare LLVMInitializeAMDGPU* functions
 
-LOCAL_C_INCLUDES := $(MESA_TOP)/src/amd/common
+LOCAL_C_INCLUDES := \
+       $(MESA_TOP)/src/amd/common \
+       $(call intermediates-dir-for,STATIC_LIBRARIES,libmesa_amd_common)/common
 
 LOCAL_SHARED_LIBRARIES := libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_radeonsi
 
-# generate sources
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-intermediates := $(call local-generated-sources-dir)
-LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES))
-
-$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
-$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
-
-$(intermediates)/sid_tables.h:  $(intermediates)/%.h: $(LOCAL_PATH)/%.py $(MESA_TOP)/src/amd/common/sid.h
-       $(transform-generated-source)
-
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)