netd_integration_test static dependecies
liblogwrap libnetdutils libnetdaidl are now static lib dependecies of
the test. Reason being that these libs are not present in 32bit on pixel
device.
libnetdutils is now a cc_library module which makes it available as both
shared and static lib.
libnetdaidl now has a static counterpart libnetdaidl_static
Bug: 64040096
Bug: 68843748
Test: system/netd compiles
Test: make vts -j64 && vts-tradefed run commandAndExit vts
--skip-all-system-status-check --skip-preconditions
--module VtsKernelNetdTest
Merged-In: I6dca0398c75db85a43e669c76c6afff33ef53aa1
Change-Id: I6dca0398c75db85a43e669c76c6afff33ef53aa1
(cherry picked from commit a426772e72344613fd1292de41c21ea0a99a6a9c)
diff --git a/libnetdutils/Android.bp b/libnetdutils/Android.bp
index fd8c89f..b278a4e 100644
--- a/libnetdutils/Android.bp
+++ b/libnetdutils/Android.bp
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
name: "libnetdutils",
srcs: [
"Fd.cpp",
diff --git a/server/Android.mk b/server/Android.mk
index 0d56eca..fd7e885 100644
--- a/server/Android.mk
+++ b/server/Android.mk
@@ -22,7 +22,7 @@
LOCAL_CFLAGS := -Wall -Werror
LOCAL_CLANG := true
LOCAL_SANITIZE := unsigned-integer-overflow
-LOCAL_MODULE := libnetdaidl
+LOCAL_MODULE := libnetdaidl_static
LOCAL_SHARED_LIBRARIES := \
libbinder \
libutils
@@ -33,6 +33,19 @@
binder/android/net/INetd.aidl \
binder/android/net/UidRange.cpp
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_CFLAGS := -Wall -Werror
+LOCAL_SANITIZE := unsigned-integer-overflow
+LOCAL_MODULE := libnetdaidl
+LOCAL_SHARED_LIBRARIES := \
+ libbinder \
+ libutils
+LOCAL_WHOLE_STATIC_LIBRARIES := libnetdaidl_static
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/binder
+
include $(BUILD_SHARED_LIBRARY)
###
diff --git a/tests/Android.mk b/tests/Android.mk
index b250bb6..9812bcb 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -24,9 +24,10 @@
LOCAL_CFLAGS += -Wno-varargs
EXTRA_LDLIBS := -lpthread
-LOCAL_SHARED_LIBRARIES += libbase libbinder libcrypto libcutils liblog liblogwrap libnetdaidl \
- libnetd_client libnetutils libssl libutils libnetdutils
-LOCAL_STATIC_LIBRARIES += libnetd_test_dnsresponder
+LOCAL_SHARED_LIBRARIES += libbase libbinder libcrypto libcutils liblog \
+ libnetd_client libnetutils libssl libutils
+LOCAL_STATIC_LIBRARIES += libnetd_test_dnsresponder liblogwrap libnetdaidl_static \
+ libnetdutils
LOCAL_AIDL_INCLUDES := system/netd/server/binder
LOCAL_C_INCLUDES += system/netd/include system/netd/binder/include \
system/netd/server system/core/logwrapper/include \