[android] add library libcutils for compiling ot-cli and ot-ncp (#6104)

When compiling ot-cli and ot-ncp, the Android.mk will compile
the function `property_get` in `src/core/api/instance_api.cpp`.
The function `property_get` is provided by the library `libcutils`.

GitHub Action uses Android NDK to compile Android.mk, Android NDK
only allows adding the shared library `libcutils` for the library
`ot-core`. However, Android requires to add the shared library
`libutils` for the binary `ot-cli` and `ot-ncp`. Therefore, this PR
uses the macro `ANDROID_NDK` to distinguish these two cases.
This commit is contained in:
Zhanglong Xia
2021-01-21 08:15:18 -08:00
committed by GitHub
parent 42633b19a8
commit 9725cf1531
+8
View File
@@ -429,6 +429,10 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ot-cli
LOCAL_MODULE_TAGS := eng
ifneq ($(ANDROID_NDK),1)
LOCAL_SHARED_LIBRARIES := libcutils
endif
LOCAL_C_INCLUDES := \
$(OPENTHREAD_PROJECT_INCLUDES) \
$(LOCAL_PATH)/include \
@@ -509,6 +513,10 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ot-ncp
LOCAL_MODULE_TAGS := eng
ifneq ($(ANDROID_NDK),1)
LOCAL_SHARED_LIBRARIES := libcutils
endif
LOCAL_C_INCLUDES := \
$(OPENTHREAD_PROJECT_INCLUDES) \
$(LOCAL_PATH)/include \