Build libc++ static w/o hidden visibility
This is to fix issue with error message reads:
.../ld: warning: hidden symbol 'snprintf' in
prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_static.a(snprintf.o) is
referenced by DSO out/target/product/hammerhead/obj/lib/libcutils.so
There is only one copy of libc++ libraries for all API levels with various degree of
libc/libm support, the reason why libc++ libraries links with android_support.a which
contains missing libc/libm functions (including snprintf) needed by libc++ in API 3.
Since https://android-review.googlesource.com/#/c/103261 all support functions in libc++
are built with hidden visibility, otherwise other libraries may use snprintf from libc++
instead of libc.so. Unfortunately unlike shared library it's not possible to hide
hidden symbol from linker, and causes warning message you just read.
This CL compile libc++ with --visible-static to restore previous behavior.
Also see https://android-review.googlesource.com/#/c/123340
Affected functions are
std::__1::__snprintf_l(char*, unsigned int, locale_struct*, char const*, ...)
vsnprintf_l
snprintf_l
vsnprintf
snprintf
Change-Id: I8b4409ca7c59eed4018acd3a9e38970074d206cb
19 files changed