From eab4a7b5f1c3fa217d9db2f464321ff08e2aa247 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 4 Nov 2016 12:26:27 -0700 Subject: [PATCH] Enable libc++ on host bionic Bug: 31559095 Test: out/soong/build.ninja is identical before/after Test: Test linux_bionic compile Change-Id: I01bfee1fd69c2757d541e1c8ffdfa15bcfa846a9 --- Android.bp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/Android.bp b/Android.bp index 6d7acc970..5df5c40f0 100644 --- a/Android.bp +++ b/Android.bp @@ -61,6 +61,11 @@ cc_library_static { "libc++abi", ], stl: "none", + target: { + linux_bionic: { + enabled: true, + }, + }, } // host + device dynamic lib @@ -79,23 +84,32 @@ cc_library_shared { static_libs: ["libunwind_llvm"], ldflags: ["-Wl,--exclude-libs,libunwind_llvm.a"], }, - host: { - ldflags: ["-nodefaultlibs"], - }, darwin: { unexported_symbols_list: "lib/libc++unexp.exp", force_symbols_not_weak_list: "lib/notweak.exp", force_symbols_weak_list: "lib/weak.exp", - ldflags: ["-Wl,-undefined,dynamic_lookup"], + ldflags: [ + "-nodefaultlibs", + "-Wl,-undefined,dynamic_lookup", + ], }, linux: { + ldflags: ["-nodefaultlibs"], host_ldlibs: [ "-lrt", "-lpthread", "-ldl", ], }, + linux_bionic: { + enabled: true, + static_libs: ["libunwindbacktrace"], + shared_libs: [ + "libdl", + "liblzma", + ], + }, }, }