aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2018-12-05 12:55:32 -0800
committerTom Cherry <tomcherry@google.com>2018-12-05 12:58:03 -0800
commit8b59f7522ce7cdf82910f8414181978ad1c36d38 (patch)
tree2faae3106df4fedf7b6bc4006557704b48e889e5
parent2d424e65079e09cc8ea5b98b6cda49014226a2f2 (diff)
downloadcompiler-rt-8b59f7522ce7cdf82910f8414181978ad1c36d38.tar.gz
Prevent dependency cycle due to system_shared_libs expansion
It was discovered that we were building some objects inconsistently due to an optimization in cc_library to only build objects once and use them for both the static and shared libraries. But static libraries didn't get system_shared_libs set automatically, and we didn't notice that we would have built the objects differently. So static libraries now get the default system_shared_libs, we allow adjusting that for static vs shared in a cc_library, and we disable the optimization if the linked libraries are configured differently between static and shared in a single cc_library. This triggers dependency cycles for static libraries that libc/libdl use, so fix those cycles here. Test: treehugger Test: build with asan enabled Change-Id: I8daf22243999e5ca2a26e4a3e63146e1c74222b2
-rw-r--r--lib/asan/Android.bp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/asan/Android.bp b/lib/asan/Android.bp
index ab1410494..de3b9285f 100644
--- a/lib/asan/Android.bp
+++ b/lib/asan/Android.bp
@@ -75,6 +75,7 @@ cc_library_static {
target: {
android: {
srcs: ["asan_preinit.cc"],
+ system_shared_libs: [],
},
host: {
srcs: asan_rtl_files,