зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1257448 - Move MOZ_MEMORY_* defines to moz.configure. r=nalexander
This commit is contained in:
Родитель
d685556de0
Коммит
cb8bf91611
|
@ -55,3 +55,26 @@ def jemalloc_for_old_configure(jemalloc, jemalloc4):
|
|||
return '--disable-jemalloc'
|
||||
|
||||
add_old_configure_arg(jemalloc_for_old_configure)
|
||||
|
||||
|
||||
@depends(jemalloc, jemalloc4, target)
|
||||
def jemalloc_os_define(jemalloc, jemalloc4, target):
|
||||
if jemalloc and not jemalloc4:
|
||||
if target.kernel == 'WINNT':
|
||||
return 'MOZ_MEMORY_WINDOWS'
|
||||
if target.kernel == 'Linux':
|
||||
return 'MOZ_MEMORY_LINUX'
|
||||
if target.kernel == 'Darwin':
|
||||
return 'MOZ_MEMORY_DARWIN'
|
||||
if target.kernel in ('kFreeBSD', 'FreeBSD', 'NetBSD'):
|
||||
return 'MOZ_MEMORY_BSD'
|
||||
die('--enable-jemalloc is not supported on %s', target.kernel)
|
||||
|
||||
set_define(jemalloc_os_define, '1')
|
||||
|
||||
@depends(jemalloc, jemalloc4, target)
|
||||
def jemalloc_os_define_android(jemalloc, jemalloc4, target):
|
||||
if jemalloc and not jemalloc4 and target.os == 'Android':
|
||||
return 'MOZ_MEMORY_ANDROID'
|
||||
|
||||
set_define(jemalloc_os_define_android, '1')
|
||||
|
|
|
@ -1994,29 +1994,9 @@ if test "$MOZ_MEMORY"; then
|
|||
dnl complicated. Therefore, simply define special cpp variables for the
|
||||
dnl platforms we have special knowledge of.
|
||||
case "${target}" in
|
||||
*-darwin*)
|
||||
AC_DEFINE(MOZ_MEMORY_DARWIN)
|
||||
;;
|
||||
*-*freebsd*)
|
||||
AC_DEFINE(MOZ_MEMORY_BSD)
|
||||
;;
|
||||
*-android*|*-linuxandroid*)
|
||||
AC_DEFINE(MOZ_MEMORY_LINUX)
|
||||
AC_DEFINE(MOZ_MEMORY_ANDROID)
|
||||
;;
|
||||
*-*linux*)
|
||||
AC_DEFINE(MOZ_MEMORY_LINUX)
|
||||
;;
|
||||
*-netbsd*)
|
||||
AC_DEFINE(MOZ_MEMORY_BSD)
|
||||
;;
|
||||
*-mingw*)
|
||||
AC_DEFINE(MOZ_MEMORY_WINDOWS)
|
||||
export MOZ_NO_DEBUG_RTL=1
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(MOZ_CRT)
|
||||
|
|
|
@ -5711,24 +5711,7 @@ else
|
|||
dnl complicated. Therefore, simply define special cpp variables for the
|
||||
dnl platforms we have special knowledge of.
|
||||
case "${target}" in
|
||||
*-darwin*)
|
||||
AC_DEFINE(MOZ_MEMORY_DARWIN)
|
||||
;;
|
||||
*-*freebsd*)
|
||||
AC_DEFINE(MOZ_MEMORY_BSD)
|
||||
;;
|
||||
*-android*|*-linuxandroid*)
|
||||
AC_DEFINE(MOZ_MEMORY_LINUX)
|
||||
AC_DEFINE(MOZ_MEMORY_ANDROID)
|
||||
;;
|
||||
*-*linux*)
|
||||
AC_DEFINE(MOZ_MEMORY_LINUX)
|
||||
;;
|
||||
*-netbsd*)
|
||||
AC_DEFINE(MOZ_MEMORY_BSD)
|
||||
;;
|
||||
*-mingw*)
|
||||
AC_DEFINE(MOZ_MEMORY_WINDOWS)
|
||||
export MOZ_NO_DEBUG_RTL=1
|
||||
if test "$MSVS_VERSION" != "2015"; then
|
||||
WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib"
|
||||
|
@ -5741,9 +5724,6 @@ else
|
|||
rm crtdll.obj
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
|
||||
;;
|
||||
esac
|
||||
fi # MOZ_MEMORY
|
||||
AC_SUBST(MOZ_SYSTEM_JEMALLOC)
|
||||
|
|
Загрузка…
Ссылка в новой задаче