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>
$(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 \
-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