android: make libbacktrace optional on USE_LIBBACKTRACE
authorTapani Pälli <tapani.palli@intel.com>
Tue, 26 Feb 2019 08:27:15 +0000 (10:27 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 27 Feb 2019 06:56:46 +0000 (08:56 +0200)
Otherwise with VNDK enabled we fail linking:
   src/gallium/targets/dri/Android.mk: error: gallium_dri (native:vendor)
   should not link to libbacktrace.vendor (native:vndk_private)

Option makes it possible to use libbacktrace only when VNDK is not
enabled.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/auxiliary/Android.mk
src/gallium/targets/dri/Android.mk

index 7618c6fcd939d230de0752be3963a0242540a305..fe976501451311b0c9fba38dbc7105dde7cd3dc9 100644 (file)
@@ -32,8 +32,11 @@ LOCAL_SRC_FILES := \
        $(C_SOURCES) \
        $(NIR_SOURCES) \
        $(RENDERONLY_SOURCES) \
-       $(VL_STUB_SOURCES) \
-       util/u_debug_stack_android.cpp
+       $(VL_STUB_SOURCES)
+
+ifeq ($(USE_LIBBACKTRACE),true)
+       LOCAL_SRC_FILES += util/u_debug_stack_android.cpp
+endif
 
 LOCAL_C_INCLUDES := \
        $(GALLIUM_TOP)/auxiliary/util \
index 9c43fa1e8fdbcd4a6fb00f295eecd3b5a51f8f15..7638a67b26f4258d85b4cdadb6d75e4f831d8952 100644 (file)
@@ -40,12 +40,15 @@ LOCAL_LDFLAGS := \
        -Wl,--undefined-version
 
 LOCAL_SHARED_LIBRARIES := \
-       libbacktrace \
        libdl \
        libglapi \
        libexpat \
        libz
 
+ifeq ($(USE_LIBBACKTRACE),true)
+       LOCAL_SHARED_LIBRARIES += libbacktrace
+endif
+
 $(foreach d, $(MESA_BUILD_GALLIUM), $(eval LOCAL_CFLAGS += $(patsubst HAVE_%,-D%,$(d))))
 
 # sort GALLIUM_LIBS to remove any duplicates