Bug 1578478 - update disabling visibility on Android for newer libc++; r=nalexander

We define some libc++-internal macros to avoid conflicts between the way
we do symbol visibility and the way libc++ expects visibility to work.
Newer NDK versions use a newer libc++ which changes the way the macro we
were using works. To enable building with newer libc++ versions, let's
also define macros appropriate to those versions as well.

Differential Revision: https://phabricator.services.mozilla.com/D44510

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nathan Froyd 2019-09-04 17:56:49 +00:00
parent b5f39847e1
commit ebeb43d427

View File

@ -1365,8 +1365,8 @@ set_config('COLOR_CFLAGS', color_cflags)
# Note that we don't need to do this with gcc, as libc++ detects gcc and
# effectively does the same thing we are doing here.
#
# _LIBCPP_ALWAYS_INLINE needs similar workarounds, since it too declares
# hidden visibility.
# _LIBCPP_ALWAYS_INLINE and _LIBCPP_HIDE_FROM_ABI need similar workarounds,
# since they too declare hidden visibility.
@depends(c_compiler, target)
@ -1381,6 +1381,7 @@ set_define('_LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49',
set_define('_LIBCPP_ALWAYS_INLINE', libcxx_override_visibility)
set_define('_LIBCPP_ALWAYS_INLINE_EXCEPT_GCC49', libcxx_override_visibility)
set_define('_LIBCPP_HIDE_FROM_ABI', libcxx_override_visibility)
@depends(target, check_build_environment)
def visibility_flags(target, env):