зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1300164 - Move VISIBILITY_FLAGS to Python configure. r=glandium
MozReview-Commit-ID: Ku1oUGVdtdm
This commit is contained in:
Родитель
2dcd8fe04b
Коммит
90dd38f890
|
@ -882,5 +882,26 @@ def libcxx_inline_visibility(c_compiler, target):
|
|||
set_define('_LIBCPP_INLINE_VISIBILITY', libcxx_inline_visibility)
|
||||
set_define('_LIBCPP_INLINE_VISIBILITY_EXCEPT_GCC49', libcxx_inline_visibility)
|
||||
|
||||
@depends(c_compiler, target, check_build_environment)
|
||||
def visibility_flags(c_compiler, target, env):
|
||||
if target.os != 'WINNT':
|
||||
if target.kernel == 'Darwin':
|
||||
return ('-fvisibility=hidden', '-fvisibility-inlines-hidden')
|
||||
return ('-I%s/system_wrappers' % os.path.join(env.dist),
|
||||
'-include',
|
||||
'%s/config/gcc_hidden.h' % env.topsrcdir)
|
||||
|
||||
@depends(target, visibility_flags)
|
||||
def wrap_system_includes(target, visibility_flags):
|
||||
if visibility_flags and target.kernel != 'Darwin':
|
||||
return True
|
||||
|
||||
set_define('HAVE_VISIBILITY_HIDDEN_ATTRIBUTE',
|
||||
depends(visibility_flags)(lambda v: bool(v) or None))
|
||||
set_define('HAVE_VISIBILITY_ATTRIBUTE',
|
||||
depends(visibility_flags)(lambda v: bool(v) or None))
|
||||
set_config('WRAP_SYSTEM_INCLUDES', wrap_system_includes)
|
||||
set_config('VISIBILITY_FLAGS', visibility_flags)
|
||||
|
||||
include('windows.configure')
|
||||
include('rust.configure')
|
||||
|
|
|
@ -1018,23 +1018,6 @@ AC_LANG_CPLUSPLUS
|
|||
|
||||
MOZ_CXX11
|
||||
|
||||
dnl Check for .hidden assembler directive and visibility attribute.
|
||||
dnl Borrowed from glibc configure.in
|
||||
dnl ===============================================================
|
||||
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
|
||||
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
||||
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
||||
case "$OS_TARGET" in
|
||||
Darwin)
|
||||
VISIBILITY_FLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'
|
||||
;;
|
||||
*)
|
||||
VISIBILITY_FLAGS="-I${DIST}/system_wrappers -include ${_topsrcdir}/config/gcc_hidden.h"
|
||||
WRAP_SYSTEM_INCLUDES=1
|
||||
;;
|
||||
esac
|
||||
fi # GNU_CC
|
||||
|
||||
case "${OS_TARGET}" in
|
||||
WINNT|Darwin|Android)
|
||||
;;
|
||||
|
@ -1044,9 +1027,6 @@ WINNT|Darwin|Android)
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(WRAP_SYSTEM_INCLUDES)
|
||||
AC_SUBST_LIST(VISIBILITY_FLAGS)
|
||||
|
||||
dnl Checks for header files.
|
||||
dnl ========================================================
|
||||
AC_HEADER_DIRENT
|
||||
|
|
|
@ -1360,23 +1360,6 @@ MOZ_CXX11
|
|||
|
||||
AC_LANG_C
|
||||
|
||||
dnl Check for .hidden assembler directive and visibility attribute.
|
||||
dnl Borrowed from glibc configure.in
|
||||
dnl ===============================================================
|
||||
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
|
||||
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
||||
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
||||
case "$OS_TARGET" in
|
||||
Darwin)
|
||||
VISIBILITY_FLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'
|
||||
;;
|
||||
*)
|
||||
VISIBILITY_FLAGS="-I${DIST}/system_wrappers -include ${_topsrcdir}/config/gcc_hidden.h"
|
||||
WRAP_SYSTEM_INCLUDES=1
|
||||
;;
|
||||
esac
|
||||
fi # GNU_CC
|
||||
|
||||
case "${OS_TARGET}" in
|
||||
Darwin)
|
||||
;;
|
||||
|
@ -1386,9 +1369,6 @@ Darwin)
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(WRAP_SYSTEM_INCLUDES)
|
||||
AC_SUBST_LIST(VISIBILITY_FLAGS)
|
||||
|
||||
dnl Checks for header files.
|
||||
dnl ========================================================
|
||||
AC_HEADER_DIRENT
|
||||
|
|
|
@ -127,9 +127,6 @@ if CONFIG['TARGET_XPCOM_ABI']:
|
|||
DEFINES['TARGET_OS_ABI'] = '"%s_%s"' % (CONFIG['OS_TARGET'],
|
||||
CONFIG['TARGET_XPCOM_ABI'])
|
||||
|
||||
if CONFIG['WRAP_SYSTEM_INCLUDES']:
|
||||
DEFINES['WRAP_SYSTEM_INCLUDES'] = True
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
|
||||
DEFINES['HAVE_USR_LIB64_DIR'] = True
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче