зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1257445 - Move some platform-specific defines to moz.configure. r=gps
This commit is contained in:
Родитель
1a641638bf
Коммит
9116f85e0e
|
@ -515,6 +515,26 @@ def host_variables(host):
|
|||
set_config('HOST_OS_ARCH', os_arch)
|
||||
|
||||
|
||||
@depends(target)
|
||||
def target_platform_defines(target):
|
||||
if target.kernel == 'WINNT':
|
||||
set_define('_WINDOWS', '1')
|
||||
set_define('WIN32', '1')
|
||||
set_define('XP_WIN', '1')
|
||||
set_define('XP_WIN32', '1')
|
||||
else:
|
||||
set_define('XP_UNIX', '1')
|
||||
|
||||
if target.kernel == 'Darwin':
|
||||
set_define('XP_DARWIN', '1')
|
||||
if target.os == 'iOS':
|
||||
set_define('XP_IOS', '1')
|
||||
elif target.os == 'OSX':
|
||||
set_define('XP_MACOSX', '1')
|
||||
elif target.kernel == 'Linux':
|
||||
set_define('XP_LINUX', '1')
|
||||
|
||||
|
||||
# The application/project to build
|
||||
# ==============================================================
|
||||
option('--enable-application', nargs=1, env='MOZ_BUILD_APP',
|
||||
|
|
|
@ -927,7 +927,6 @@ dnl ========================================================
|
|||
|
||||
case "$target" in
|
||||
*-darwin*)
|
||||
AC_DEFINE(XP_DARWIN)
|
||||
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
|
||||
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
|
||||
MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector"
|
||||
|
@ -1194,10 +1193,6 @@ case "$target" in
|
|||
fi
|
||||
AC_DEFINE(HAVE_SNPRINTF)
|
||||
AC_DEFINE(HAVE__MSIZE)
|
||||
AC_DEFINE(_WINDOWS)
|
||||
AC_DEFINE(WIN32)
|
||||
AC_DEFINE(XP_WIN)
|
||||
AC_DEFINE(XP_WIN32)
|
||||
AC_DEFINE(HW_THREADS)
|
||||
AC_DEFINE(STDC_HEADERS)
|
||||
AC_DEFINE(WIN32_LEAN_AND_MEAN)
|
||||
|
@ -2777,18 +2772,6 @@ AC_CHECK_FUNCS(posix_fadvise posix_fallocate)
|
|||
dnl Set various defines and substitutions
|
||||
dnl ========================================================
|
||||
|
||||
if test "$OS_ARCH" = "Darwin"; then
|
||||
if test -n "$MOZ_IOS"; then
|
||||
AC_DEFINE(XP_IOS)
|
||||
else
|
||||
AC_DEFINE(XP_MACOSX)
|
||||
fi
|
||||
AC_DEFINE(XP_DARWIN)
|
||||
AC_DEFINE(XP_UNIX)
|
||||
elif test "$OS_ARCH" != "WINNT"; then
|
||||
AC_DEFINE(XP_UNIX)
|
||||
fi
|
||||
|
||||
if test "$MOZ_DEBUG"; then
|
||||
AC_DEFINE(MOZ_REFLOW_PERF)
|
||||
AC_DEFINE(MOZ_REFLOW_PERF_DSP)
|
||||
|
|
|
@ -1331,12 +1331,8 @@ case "$target" in
|
|||
AC_MSG_ERROR([targeting iOS but not using an iOS SDK?])
|
||||
fi
|
||||
if test -n "$MOZ_IOS"; then
|
||||
AC_DEFINE(XP_IOS)
|
||||
AC_DEFINE(XP_DARWIN)
|
||||
direct_nspr_config=1
|
||||
else
|
||||
AC_DEFINE(XP_MACOSX)
|
||||
AC_DEFINE(XP_DARWIN)
|
||||
# The ExceptionHandling framework is needed for Objective-C exception
|
||||
# logging code in nsObjCExceptions.h. Currently we only use that in debug
|
||||
# builds.
|
||||
|
@ -1643,10 +1639,6 @@ case "$target" in
|
|||
MOZ_MEMORY=1
|
||||
fi
|
||||
AC_DEFINE(HAVE_SNPRINTF)
|
||||
AC_DEFINE(_WINDOWS)
|
||||
AC_DEFINE(WIN32)
|
||||
AC_DEFINE(XP_WIN)
|
||||
AC_DEFINE(XP_WIN32)
|
||||
AC_DEFINE(HW_THREADS)
|
||||
AC_DEFINE(STDC_HEADERS)
|
||||
AC_DEFINE(WIN32_LEAN_AND_MEAN)
|
||||
|
@ -1739,13 +1731,6 @@ AC_SUBST_LIST(MMX_FLAGS)
|
|||
AC_SUBST_LIST(SSE_FLAGS)
|
||||
AC_SUBST_LIST(SSE2_FLAGS)
|
||||
|
||||
case "$target" in
|
||||
*-*linux*)
|
||||
# Includes linux-android
|
||||
AC_DEFINE(XP_LINUX)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(MOZ_LINKER)
|
||||
if test -n "$MOZ_LINKER"; then
|
||||
AC_DEFINE(MOZ_LINKER)
|
||||
|
@ -7724,10 +7709,6 @@ fi # COMPILE_ENVIRONMENT
|
|||
dnl Set various defines and substitutions
|
||||
dnl ========================================================
|
||||
|
||||
if test "$OS_ARCH" != "WINNT"; then
|
||||
AC_DEFINE(XP_UNIX)
|
||||
fi
|
||||
|
||||
if test "$MOZ_DEBUG"; then
|
||||
AC_DEFINE(MOZ_REFLOW_PERF)
|
||||
AC_DEFINE(MOZ_REFLOW_PERF_DSP)
|
||||
|
|
Загрузка…
Ссылка в новой задаче