From e6132be52976045ebfa41eab558ad499ecb41659 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Mon, 25 Mar 2019 20:38:56 -0700 Subject: [PATCH] libutils/libcutils: make host more like device Having shared host libraries allows libraries depending on these to use 'shared_libs' for these. This simplifies configurations since these libraries don't have to specify 'shared_libs' on all non-host targets. Bug: 124524556 Test: build only Change-Id: I09fb4a4fb66ea0a87cb76b1e6f400c537a11f082 --- libcutils/Android.bp | 5 ++--- libutils/Android.bp | 24 +++++++++--------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/libcutils/Android.bp b/libcutils/Android.bp index b4b8cd1ea..c821373a9 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp @@ -84,6 +84,8 @@ cc_library { ], }, windows: { + host_ldlibs: ["-lws2_32"], + srcs: [ "socket_inaddr_any_server_windows.cpp", "socket_network_client_windows.cpp", @@ -92,9 +94,6 @@ cc_library { ], enabled: true, - shared: { - enabled: false, - }, cflags: [ "-D_GNU_SOURCE", ], diff --git a/libutils/Android.bp b/libutils/Android.bp index c67ff8fab..3e7d0bac1 100644 --- a/libutils/Android.bp +++ b/libutils/Android.bp @@ -69,6 +69,7 @@ cc_defaults { ], shared_libs: [ + "libcutils", "liblog", ], @@ -83,7 +84,6 @@ cc_defaults { cflags: ["-fvisibility=protected"], shared_libs: [ - "libcutils", "libprocessgroup", "libdl", "libvndksupport", @@ -98,14 +98,6 @@ cc_defaults { exclude_shared_libs: ["libvndksupport"], }, - host: { - cflags: ["-DLIBUTILS_NATIVE=1"], - - shared: { - enabled: false, - }, - }, - linux_bionic: { enabled: true, }, @@ -180,18 +172,20 @@ cc_library { }, }, + shared_libs: [ + "libutils", + "libbacktrace", + ], + target: { - android: { - shared_libs: [ - "libutils", - "libbacktrace", - ], - }, linux: { srcs: [ "ProcessCallStack.cpp", ], }, + windows: { + enabled: false, + }, }, }