зеркало из https://github.com/mozilla/gecko-dev.git
Merge b-s to m-c.
This commit is contained in:
Коммит
1dc443028e
|
@ -65,13 +65,15 @@ tier_base_dirs = \
|
|||
$(NULL)
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
tier_base_dirs += \
|
||||
memory \
|
||||
$(NULL)
|
||||
ifdef MOZ_MEMORY
|
||||
tier_base_dirs += memory/jemalloc
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET),Android)
|
||||
tier_base_dirs += other-licenses/android
|
||||
endif
|
||||
|
||||
tier_base_dirs += memory/mozalloc
|
||||
endif
|
||||
|
||||
ifdef COMPILE_ENVIRONMENT
|
||||
|
|
|
@ -88,10 +88,6 @@ endif
|
|||
include $(topsrcdir)/ipc/app/defs.mk
|
||||
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
|
||||
|
||||
ifdef WIN32_OLD_STYLE_JEMALLOC
|
||||
DEFINES += -DWIN32_OLD_STYLE_JEMALLOC=1
|
||||
endif
|
||||
|
||||
ifneq (,$(filter aurora beta,$(MOZ_UPDATE_CHANNEL)))
|
||||
DEFINES += -DSHIP_FEEDBACK=1
|
||||
endif
|
||||
|
|
|
@ -61,14 +61,8 @@
|
|||
#endif
|
||||
#ifdef XP_WIN32
|
||||
#ifdef MOZ_MEMORY
|
||||
#ifdef WIN32_OLD_STYLE_JEMALLOC
|
||||
@BINPATH@/mozcrt19.dll
|
||||
@BINPATH@/mozcpp19.dll
|
||||
#else
|
||||
@BINPATH@/jemalloc.dll
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if _MSC_VER == 1400
|
||||
@BINPATH@/Microsoft.VC80.CRT.manifest
|
||||
@BINPATH@/msvcm80.dll
|
||||
|
|
|
@ -1272,14 +1272,8 @@ xpicleanup@BIN_SUFFIX@
|
|||
components/nsPostUpdateWin.js
|
||||
js3250.dll
|
||||
plugins/npnul32.dll
|
||||
#ifdef MOZ_MEMORY
|
||||
Microsoft.VC80.CRT.manifest
|
||||
msvcm80.dll
|
||||
msvcp80.dll
|
||||
msvcr80.dll
|
||||
#else
|
||||
mozcrt19.dll
|
||||
#endif
|
||||
mozcrt19.dll
|
||||
mozcpp19.dll
|
||||
#endif
|
||||
@DLL_PREFIX@xpcom_core@DLL_SUFFIX@
|
||||
components/@DLL_PREFIX@jar50@DLL_SUFFIX@
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
# order:
|
||||
# if $MOZCONFIG is set, use that.
|
||||
# Otherwise, use $TOPSRCDIR/.mozconfig
|
||||
# Otherwise, use $HOME/.mozconfig
|
||||
#
|
||||
topsrcdir=$1
|
||||
|
||||
|
@ -67,19 +66,29 @@ abspath() {
|
|||
echo `pwd`/$1
|
||||
}
|
||||
|
||||
if [ -n "$MOZCONFIG" ] && ! [ -f "$MOZCONFIG" ]; then
|
||||
echo "Specified MOZCONFIG \"$MOZCONFIG\" does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$MOZ_MYCONFIG" ]; then
|
||||
echo "Your environment currently has the MOZ_MYCONFIG variable set to \"$MOZ_MYCONFIG\". MOZ_MYCONFIG is no longer supported. Please use MOZCONFIG instead."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for _config in "$MOZCONFIG" \
|
||||
"$MOZ_MYCONFIG"
|
||||
"$topsrcdir/.mozconfig"
|
||||
do
|
||||
if [ -n "$_config" ] && ! [ -f "$_config" ]; then
|
||||
echo "Specified MOZCONFIG \"$_config\" does not exist!"
|
||||
exit 1
|
||||
if test -f "$_config"; then
|
||||
echo `abspath $_config`
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
for _config in "$MOZCONFIG" \
|
||||
"$MOZ_MYCONFIG" \
|
||||
"$topsrcdir/.mozconfig" \
|
||||
"$topsrcdir/mozconfig" \
|
||||
# We used to support a number of other implicit .mozconfig locations. We now
|
||||
# detect if we were about to use any of these locations and issue an error if we
|
||||
# find any.
|
||||
for _config in "$topsrcdir/mozconfig" \
|
||||
"$topsrcdir/mozconfig.sh" \
|
||||
"$topsrcdir/myconfig.sh" \
|
||||
"$HOME/.mozconfig" \
|
||||
|
@ -87,7 +96,7 @@ for _config in "$MOZCONFIG" \
|
|||
"$HOME/.mozmyconfig.sh"
|
||||
do
|
||||
if test -f "$_config"; then
|
||||
echo `abspath $_config`
|
||||
exit 0
|
||||
echo "You currently have a mozconfig at \"$_config\". This implicit location is no longer supported. Please move it to $topsrcdir/.mozconfig or specify it explicitly via \$MOZCONFIG.";
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -64,7 +64,6 @@ endif # ENABLE_TESTS
|
|||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifndef MOZ_MEMORY
|
||||
ifdef WIN32_REDIST_DIR
|
||||
ifndef MOZ_DEBUG
|
||||
|
||||
|
@ -101,4 +100,3 @@ endif
|
|||
|
||||
endif # ! MOZ_DEBUG
|
||||
endif # WIN32_REDIST_DIR
|
||||
endif # ! MOZ_MEMORY
|
||||
|
|
|
@ -627,18 +627,14 @@ MOZ_TOOLS_DIR = @MOZ_TOOLS_DIR@
|
|||
MOZ_QUANTIFY = @MOZ_QUANTIFY@
|
||||
MSMANIFEST_TOOL = @MSMANIFEST_TOOL@
|
||||
WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
|
||||
WIN32_CRT_SRC_DIR = @WIN32_CRT_SRC_DIR@
|
||||
MOZ_MEMORY_LDFLAGS = @MOZ_MEMORY_LDFLAGS@
|
||||
WIN32_OLD_STYLE_JEMALLOC = @WIN32_OLD_STYLE_JEMALLOC@
|
||||
WIN32_CRT_LIBS = @WIN32_CRT_LIBS@
|
||||
MOZ_CRT_CPU_ARCH = @MOZ_CRT_CPU_ARCH@
|
||||
|
||||
# This is for custom CRT building
|
||||
ifdef MOZ_MEMORY
|
||||
ifdef WIN32_CRT_SRC_DIR
|
||||
DLLFLAGS = @DLLFLAGS@
|
||||
endif
|
||||
endif
|
||||
|
||||
# Codesighs tools option, enables win32 mapfiles.
|
||||
MOZ_MAPINFO = @MOZ_MAPINFO@
|
||||
|
|
|
@ -519,11 +519,16 @@ endif # USE_STATIC_LIBS
|
|||
endif # WINNT && !GNU_CC
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
# Darwin doesn't cross-compile, so just set both types of flags here.
|
||||
# Compiling ObjC requires an Apple compiler anyway, so it's ok to set
|
||||
# host CMFLAGS here.
|
||||
HOST_CMFLAGS += -fobjc-exceptions
|
||||
HOST_CMMFLAGS += -fobjc-exceptions
|
||||
OS_COMPILE_CMFLAGS += -fobjc-exceptions
|
||||
OS_COMPILE_CMMFLAGS += -fobjc-exceptions
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),uikit)
|
||||
OS_COMPILE_CMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
|
||||
OS_COMPILE_CMMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS)
|
||||
|
|
104
configure.in
104
configure.in
|
@ -2106,7 +2106,17 @@ case "$target" in
|
|||
# The ExceptionHandling framework is needed for Objective-C exception
|
||||
# logging code in nsObjCExceptions.h. Currently we only use that in debug
|
||||
# builds.
|
||||
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
AC_MSG_CHECKING([for -framework ExceptionHandling])
|
||||
LDFLAGS="$LDFLAGS -framework ExceptionHandling"
|
||||
AC_TRY_LINK(,[return 0;],
|
||||
ac_cv_have_framework_exceptionhandling="yes",
|
||||
ac_cv_have_framework_exceptionhandling="no")
|
||||
AC_MSG_RESULT([$ac_cv_have_framework_exceptionhandling])
|
||||
if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then
|
||||
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
|
||||
fi
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
# Debug builds should always have frame pointers
|
||||
MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer"
|
||||
|
||||
|
@ -3273,7 +3283,7 @@ dnl These are all the places some variant of statfs can be hiding.
|
|||
MOZ_CHECK_HEADERS(sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h)
|
||||
|
||||
dnl Quota support
|
||||
MOZ_CHECK_HEADERS(sys/quota.h)
|
||||
MOZ_CHECK_HEADERS(sys/quota.h sys/sysmacros.h)
|
||||
MOZ_CHECK_HEADERS(linux/quota.h)
|
||||
|
||||
dnl Try for MMX support
|
||||
|
@ -4997,13 +5007,27 @@ cairo-os2)
|
|||
;;
|
||||
|
||||
cairo-cocoa)
|
||||
MOZ_WIDGET_TOOLKIT=cocoa
|
||||
AC_DEFINE(MOZ_WIDGET_COCOA)
|
||||
# Check if we have the Cocoa framework, or if we're targeting Cocoa Touch
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -framework Cocoa"
|
||||
AC_TRY_LINK(,[return 0;],_HAVE_FRAMEWORK_COCOA=1,_HAVE_FRAMEWORK_COCOA=)
|
||||
if test -z "$_HAVE_FRAMEWORK_COCOA"; then
|
||||
LDFLAGS="$_SAVE_LDFLAGS -framework UIKit";
|
||||
AC_TRY_LINK(,[return 0;],_HAVE_FRAMEWORK_UIKIT=1,
|
||||
AC_MSG_ERROR([Neither Cocoa nor UIKit frameworks were found. Are you using the correct SDK?]))
|
||||
MOZ_WIDGET_TOOLKIT=uikit
|
||||
AC_DEFINE(MOZ_WIDGET_UIKIT)
|
||||
TK_LIBS='-framework Foundation -framework CoreFoundation -framework CoreGraphics -framework CoreText'
|
||||
else
|
||||
MOZ_WIDGET_TOOLKIT=cocoa
|
||||
AC_DEFINE(MOZ_WIDGET_COCOA)
|
||||
TK_LIBS='-framework QuartzCore -framework Carbon -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework AddressBook -framework OpenGL'
|
||||
fi
|
||||
MOZ_USER_DIR="Mozilla"
|
||||
AC_DEFINE(XP_MACOSX)
|
||||
TK_LIBS='-framework QuartzCore -framework Carbon -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework AddressBook -framework OpenGL'
|
||||
|
||||
TK_CFLAGS="-DNO_X11"
|
||||
LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
|
||||
LDFLAGS="$LDFLAGS -lobjc"
|
||||
CFLAGS="$CFLAGS $TK_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
|
||||
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
|
||||
|
@ -7381,7 +7405,7 @@ else
|
|||
AC_DEFINE(MOZ_MEMORY_LINUX)
|
||||
AC_DEFINE(MOZ_MEMORY_ANDROID)
|
||||
_WRAP_MALLOC=1
|
||||
export WRAP_MALLOC_LIB="-L$_objdir/dist/lib -lmozalloc -lmozutils"
|
||||
export WRAP_MALLOC_LIB="-L$_objdir/dist/lib -lmozutils"
|
||||
WRAP_MALLOC_CFLAGS="-Wl,--wrap=dlopen -Wl,--wrap=dlclose -Wl,--wrap=dlerror -Wl,--wrap=dlsym -Wl,--wrap=dladdr"
|
||||
;;
|
||||
*-*linux*)
|
||||
|
@ -7395,54 +7419,20 @@ else
|
|||
;;
|
||||
*-mingw*)
|
||||
AC_DEFINE(MOZ_MEMORY_WINDOWS)
|
||||
AC_MSG_CHECKING([for VC2005/2008++ CRT source])
|
||||
if test "$CC_VERSION" == "14.00.50727.762" -o "$CC_VERSION" == "15.00.30729.01"; then
|
||||
if test -z "$WIN32_CRT_SRC_DIR" -a -n "$VCINSTALLDIR"; then
|
||||
WIN32_CRT_SRC_DIR="$VCINSTALLDIR\crt\src"
|
||||
fi
|
||||
if test -n "$WIN32_CRT_SRC_DIR" -a -d "$WIN32_CRT_SRC_DIR"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
dnl cpu check
|
||||
case "${target_cpu}" in
|
||||
i*86)
|
||||
MOZ_CRT_CPU_ARCH=intel
|
||||
;;
|
||||
x86_64)
|
||||
MOZ_CRT_CPU_ARCH=amd64
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(MOZ_CRT_CPU_ARCH)
|
||||
WIN32_OLD_STYLE_JEMALLOC=1
|
||||
AC_DEFINE(WIN32_OLD_STYLE_JEMALLOC)
|
||||
WIN32_CRT_SRC_DIR=`cd "$WIN32_CRT_SRC_DIR" && pwd -W`
|
||||
_objdir_win=`pwd -W`
|
||||
WIN32_CUSTOM_CRT_DIR="$_objdir_win/memory/jemalloc/crtsrc/build/$MOZ_CRT_CPU_ARCH"
|
||||
MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\" -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt19 -DEFAULTLIB:mozcpp19"
|
||||
fi
|
||||
if test -z "$MOZ_DEBUG"; then
|
||||
WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib"
|
||||
else
|
||||
WIN32_CRT_LIBS="msvcrtd.lib msvcprtd.lib"
|
||||
fi
|
||||
if test -z "$WIN32_OLD_STYLE_JEMALLOC"; then
|
||||
AC_MSG_RESULT([no])
|
||||
WIN32_NEW_STYLE_JEMALLOC=1
|
||||
AC_DEFINE(WIN32_NEW_STYLE_JEMALLOC)
|
||||
WIN32_CRT_SRC_DIR=
|
||||
if test -z "$MOZ_DEBUG"; then
|
||||
WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib"
|
||||
else
|
||||
WIN32_CRT_LIBS="msvcrtd.lib msvcprtd.lib"
|
||||
fi
|
||||
dnl Look for a broken crtdll.obj
|
||||
WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
|
||||
lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
|
||||
if grep -q '__imp__\{0,1\}free' crtdll.obj; then
|
||||
MOZ_MEMORY_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
|
||||
else
|
||||
MOZ_MEMORY_LDFLAGS='$(DIST)/../memory/jemalloc/jemalloc.lib'
|
||||
fi
|
||||
rm crtdll.obj
|
||||
dnl Look for a broken crtdll.obj
|
||||
WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
|
||||
lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
|
||||
if grep -q '__imp__\{0,1\}free' crtdll.obj; then
|
||||
MOZ_MEMORY_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
|
||||
else
|
||||
MOZ_MEMORY_LDFLAGS='$(DIST)/../memory/jemalloc/jemalloc.lib'
|
||||
fi
|
||||
rm crtdll.obj
|
||||
|
||||
dnl Also pass this to NSPR/NSS
|
||||
DLLFLAGS="$DLLFLAGS $MOZ_MEMORY_LDFLAGS"
|
||||
|
@ -7462,9 +7452,7 @@ else
|
|||
fi # MOZ_MEMORY
|
||||
AC_SUBST(MOZ_MEMORY)
|
||||
AC_SUBST(MOZ_MEMORY_LDFLAGS)
|
||||
AC_SUBST(WIN32_OLD_STYLE_JEMALLOC)
|
||||
AC_SUBST(WIN32_CRT_LIBS)
|
||||
AC_SUBST(WIN32_CRT_SRC_DIR)
|
||||
dnl Need to set this for make because NSS doesn't have configure
|
||||
AC_SUBST(DLLFLAGS)
|
||||
|
||||
|
@ -7478,7 +7466,7 @@ MOZ_ARG_ENABLE_BOOL(wrap-malloc,
|
|||
|
||||
if test -n "$_WRAP_MALLOC"; then
|
||||
if test "$GNU_CC"; then
|
||||
WRAP_MALLOC_CFLAGS="${LDFLAGS} ${WRAP_MALLOC_CFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,calloc -Wl,--wrap -Wl,valloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,memalign -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wl,--wrap -Wl,strdup -Wl,--wrap -Wl,strndup -Wl,--wrap -Wl,posix_memalign"
|
||||
WRAP_MALLOC_CFLAGS="${LDFLAGS} ${WRAP_MALLOC_CFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,calloc -Wl,--wrap -Wl,valloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,memalign -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wl,--wrap -Wl,strdup -Wl,--wrap -Wl,strndup -Wl,--wrap -Wl,posix_memalign -Wl,--wrap,malloc_usable_size"
|
||||
MKSHLIB="$MKSHLIB"' $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB)'
|
||||
MKCSHLIB="$MKCSHLIB"' $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB)'
|
||||
fi
|
||||
|
@ -8019,6 +8007,7 @@ dnl Test for correct temporary object destruction order
|
|||
dnl ========================================================
|
||||
dnl We want to make sure the compiler follows the C++ spec here as
|
||||
dnl xpcom and the string classes depend on it (bug 235381).
|
||||
if test -z "$CROSS_COMPILE"; then
|
||||
AC_MSG_CHECKING([for correct temporary object destruction order])
|
||||
AC_TRY_RUN([ class A {
|
||||
public: A(int& x) : mValue(x) {}
|
||||
|
@ -8043,6 +8032,7 @@ AC_MSG_RESULT([$result])
|
|||
if test "$result" = "no"; then
|
||||
AC_MSG_ERROR([Your compiler does not follow the C++ specification for temporary object destruction order.])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Autoconf test for gcc 2.7.2.x (and maybe others?) so that we don't
|
||||
|
@ -8526,7 +8516,7 @@ if test "$MOZ_TREE_CAIRO"; then
|
|||
qt)
|
||||
QT_SURFACE_FEATURE="#define CAIRO_HAS_QT_SURFACE 1"
|
||||
;;
|
||||
cocoa)
|
||||
cocoa | uikit)
|
||||
QUARTZ_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_SURFACE 1"
|
||||
QUARTZ_IMAGE_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1"
|
||||
QUARTZ_FONT_FEATURE="#define CAIRO_HAS_QUARTZ_FONT 1"
|
||||
|
|
|
@ -374,7 +374,7 @@ public:
|
|||
_flush_cache(reinterpret_cast<char*>(code), size, BCACHE);
|
||||
#endif
|
||||
}
|
||||
#elif WTF_CPU_ARM_THUMB2 && WTF_OS_IOS
|
||||
#elif WTF_CPU_ARM && WTF_OS_IOS
|
||||
static void cacheFlush(void* code, size_t size)
|
||||
{
|
||||
sys_dcache_flush(code, size);
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
/* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */
|
||||
/* On ARMv5 and below the natural alignment is required.
|
||||
And there are some other differences for v5 or earlier. */
|
||||
#if !defined(ARMV5_OR_LOWER) && WTF_CPU_ARM && WTF_ARM_ARCH_VERSION >= 6
|
||||
#if !defined(ARMV5_OR_LOWER) && WTF_CPU_ARM && !(WTF_ARM_ARCH_VERSION >= 6)
|
||||
#define WTF_CPU_ARMV5_OR_LOWER 1
|
||||
#endif
|
||||
|
||||
|
@ -1115,7 +1115,8 @@
|
|||
/* Setting this flag prevents the assembler from using RWX memory; this may improve
|
||||
security but currectly comes at a significant performance cost. */
|
||||
#if WTF_PLATFORM_IOS
|
||||
#define ENABLE_ASSEMBLER_WX_EXCLUSIVE 1
|
||||
//XXX: this doesn't currently compile in the spidermonkey build
|
||||
#define ENABLE_ASSEMBLER_WX_EXCLUSIVE 0
|
||||
#endif
|
||||
|
||||
/* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
|
||||
|
|
|
@ -519,11 +519,16 @@ endif # USE_STATIC_LIBS
|
|||
endif # WINNT && !GNU_CC
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
# Darwin doesn't cross-compile, so just set both types of flags here.
|
||||
# Compiling ObjC requires an Apple compiler anyway, so it's ok to set
|
||||
# host CMFLAGS here.
|
||||
HOST_CMFLAGS += -fobjc-exceptions
|
||||
HOST_CMMFLAGS += -fobjc-exceptions
|
||||
OS_COMPILE_CMFLAGS += -fobjc-exceptions
|
||||
OS_COMPILE_CMMFLAGS += -fobjc-exceptions
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),uikit)
|
||||
OS_COMPILE_CMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
|
||||
OS_COMPILE_CMMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS)
|
||||
|
|
|
@ -1119,6 +1119,7 @@ MOZ_ARG_ENABLE_STRING(macos-target,
|
|||
Set the minimum MacOS version needed at runtime],
|
||||
[_MACOSX_DEPLOYMENT_TARGET=$enableval])
|
||||
|
||||
if test "$target_cpu" != "arm"; then
|
||||
case "$target" in
|
||||
*-darwin*)
|
||||
if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
|
||||
|
@ -1141,6 +1142,7 @@ case "$target" in
|
|||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
|
||||
|
||||
|
@ -2006,12 +2008,22 @@ case "$target" in
|
|||
STRIP="$STRIP -x -S"
|
||||
_PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
|
||||
TARGET_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
|
||||
LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
|
||||
LDFLAGS="$LDFLAGS -lobjc"
|
||||
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
|
||||
# The ExceptionHandling framework is needed for Objective-C exception
|
||||
# logging code in nsObjCExceptions.h. Currently we only use that in debug
|
||||
# builds.
|
||||
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling"
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
AC_MSG_CHECKING([for -framework ExceptionHandling])
|
||||
LDFLAGS="$LDFLAGS -framework ExceptionHandling"
|
||||
AC_TRY_LINK(,[return 0;],
|
||||
ac_cv_have_framework_exceptionhandling="yes",
|
||||
ac_cv_have_framework_exceptionhandling="no")
|
||||
AC_MSG_RESULT([$ac_cv_have_framework_exceptionhandling])
|
||||
if test "$ac_cv_have_framework_exceptionhandling" = "yes"; then
|
||||
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
|
||||
fi
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
# Debug builds should always have frame pointers
|
||||
MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer"
|
||||
|
||||
|
@ -4380,6 +4392,9 @@ arm-Android)
|
|||
MOZ_FPU=vfp
|
||||
MOZ_FLOAT_ABI=softfp
|
||||
;;
|
||||
arm-Darwin)
|
||||
MOZ_THUMB=yes
|
||||
;;
|
||||
arm-*)
|
||||
if test -n "$MOZ_PLATFORM_MAEMO"; then
|
||||
MOZ_THUMB=no
|
||||
|
|
|
@ -7625,6 +7625,12 @@ arm_check_vfp()
|
|||
return arm_has_vfp;
|
||||
}
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
// Hardcoded for now, revisit in the future
|
||||
static unsigned int
|
||||
arm_check_arch() { return 6; }
|
||||
static bool
|
||||
arm_check_vfp() { return true; }
|
||||
#else
|
||||
#warning Not sure how to check for architecture variant on your platform. Assuming ARMv4.
|
||||
static unsigned int
|
||||
|
|
|
@ -258,9 +258,13 @@ namespace nanojit
|
|||
}
|
||||
|
||||
#if defined(AVMPLUS_UNIX) && defined(NANOJIT_ARM)
|
||||
#if defined(__APPLE__)
|
||||
#include <libkern/OSCacheControl.h>
|
||||
#else
|
||||
#include <asm/unistd.h>
|
||||
extern "C" void __clear_cache(char *BEG, char *END);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(AVMPLUS_UNIX) && defined(NANOJIT_MIPS)
|
||||
#include <asm/cachectl.h>
|
||||
|
@ -350,6 +354,10 @@ extern "C" void sync_instruction_memory(caddr_t v, u_int len);
|
|||
void CodeAlloc::flushICache(void *start, size_t len) {
|
||||
cacheflush((int)start, (int)start + len, 0);
|
||||
}
|
||||
#elif defined(AVMPLUS_ARM) && defined(__APPLE__)
|
||||
void CodeAlloc::flushICache(void *start, size_t len) {
|
||||
sys_dcache_flush(start, len);
|
||||
}
|
||||
#else
|
||||
// fixme: __clear_cache is a libgcc feature, test for libgcc or gcc
|
||||
void CodeAlloc::flushICache(void *start, size_t len) {
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
|
||||
#elif defined(__ARM_ARCH_6__) || \
|
||||
defined(__ARM_ARCH_6J__) || \
|
||||
defined(__ARM_ARCH_6K__) || \
|
||||
defined(__ARM_ARCH_6T2__) || \
|
||||
defined(__ARM_ARCH_6Z__) || \
|
||||
defined(__ARM_ARCH_6ZK__) || \
|
||||
|
|
|
@ -49,70 +49,11 @@ MODULE = jemalloc
|
|||
# symbols.
|
||||
VISIBILITY_FLAGS=
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
ifdef WIN32_OLD_STYLE_JEMALLOC
|
||||
# Building the CRT from source
|
||||
CRT_OBJ_DIR = $(CURDIR)/crtsrc
|
||||
MOZ_CRT_DLL_NAME = mozcrt19
|
||||
MOZ_CRTCPP_DLL_NAME = mozcpp19
|
||||
MOZ_CRT_STATIC_LIBS = libcmt libcpmt
|
||||
MOZ_CRT_DLL = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRT_DLL_NAME).dll
|
||||
MOZ_CRT_IMPORT_LIB = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRT_DLL_NAME).lib
|
||||
MOZ_CRTCPP_DLL = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRTCPP_DLL_NAME).dll
|
||||
MOZ_CRTCPP_IMPORT_LIB = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRTCPP_DLL_NAME).lib
|
||||
|
||||
# copy the CRT DLLs to dist/bin,
|
||||
# copy the import libs to dist/lib
|
||||
libs:: $(MOZ_CRT_DLL) $(MOZ_CRT_IMPORT_LIB)
|
||||
$(INSTALL) $(MOZ_CRT_DLL) $(MOZ_CRTCPP_DLL) $(FINAL_TARGET)
|
||||
$(INSTALL) $(MOZ_CRT_IMPORT_LIB) $(MOZ_CRTCPP_IMPORT_LIB) $(DIST)/lib
|
||||
|
||||
$(MOZ_CRT_IMPORT_LIB): $(MOZ_CRT_DLL)
|
||||
|
||||
define EXTRACT_CMD
|
||||
cd $(CRT_OBJ_DIR)/$(MOZ_CRT_CPU_ARCH)/$(i)_lib && lib "-extract:..\\build\\$(MOZ_CRT_CPU_ARCH)\\$(i)_obj\\unhandld.obj" eh.lib
|
||||
|
||||
endef # don't touch the blank line. actually, don't touch anything in this file.
|
||||
|
||||
# patch if necessary
|
||||
ifeq ($(CC_VERSION), 14.00.50727.762)
|
||||
CRTDIFF=crtvc8sp1-$(MOZ_CRT_CPU_ARCH).diff
|
||||
else
|
||||
CRTDIFF=crtvc9sp1-$(MOZ_CRT_CPU_ARCH).diff
|
||||
endif
|
||||
|
||||
$(CRT_OBJ_DIR)/jemalloc.c: $(srcdir)/$(CRTDIFF)
|
||||
rm -rf $(CRT_OBJ_DIR)
|
||||
cp -R "$(WIN32_CRT_SRC_DIR)" $(CRT_OBJ_DIR)
|
||||
# per http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1189363&SiteID=1
|
||||
$(foreach i,dll mt xdll xmt,$(EXTRACT_CMD))
|
||||
# truly awful
|
||||
#XXX: get ed into mozillabuild, bug 415123
|
||||
$(PERL) $(srcdir)/apply-ed-patches.pl $(srcdir)/$(CRTDIFF) \
|
||||
$(CRT_OBJ_DIR) $(srcdir)/ed.exe
|
||||
|
||||
$(MOZ_CRT_DLL): \
|
||||
$(CRT_OBJ_DIR)/jemalloc.c $(srcdir)/jemalloc.c $(srcdir)/jemalloc.h \
|
||||
$(srcdir)/jemalloc_types.h $(srcdir)/rb.h
|
||||
cp $(srcdir)/jemalloc.c $(srcdir)/jemalloc.h $(srcdir)/jemalloc_types.h $(srcdir)/rb.h \
|
||||
$(CRT_OBJ_DIR)
|
||||
# this pretty much sucks, but nmake and make don't play well together
|
||||
$(PYTHON) $(srcdir)/build-crt.py $(CRT_OBJ_DIR)
|
||||
# XXX: these don't link right for some reason; the problem is likely
|
||||
# that not all the standard symbols are exported; looks like MSFT
|
||||
# never updated the sample.def files; could probably fix if someone
|
||||
# were ever bored enough. :-)
|
||||
rm -f $(addsuffix .lib, $(addprefix $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/, $(MOZ_CRT_STATIC_LIBS)))
|
||||
rm -f $(addsuffix .pdb, $(addprefix $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/, $(MOZ_CRT_STATIC_LIBS)))
|
||||
|
||||
# but still export jemalloc.h
|
||||
EXPORTS = jemalloc.h jemalloc_types.h
|
||||
|
||||
else
|
||||
|
||||
CSRCS = jemalloc.c
|
||||
EXPORTS = jemalloc.h jemalloc_types.h
|
||||
LIBRARY_NAME = jemalloc
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
FORCE_SHARED_LIB = 1
|
||||
|
||||
MOZ_MEMORY_LDFLAGS = # Don't link against ourselves
|
||||
|
@ -122,8 +63,6 @@ DEFFILE = $(srcdir)/jemalloc.def
|
|||
LDFLAGS += -ENTRY:DllMain
|
||||
|
||||
NO_INSTALL_IMPORT_LIBRARY = 1
|
||||
|
||||
endif
|
||||
else # Not Windows
|
||||
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
|
@ -132,29 +71,24 @@ MODULE_OPTIMIZE_FLAGS = -xO5
|
|||
endif
|
||||
endif
|
||||
|
||||
LIBRARY_NAME = jemalloc
|
||||
|
||||
# Build jemalloc as a shared lib. This is mandatory for Darwin, since a library
|
||||
# init function is used on that platform.
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
FORCE_SHARED_LIB= 1
|
||||
else
|
||||
# On Android, we're going to link jemalloc into mozutils, and that only works
|
||||
# properly if we only build a fakelib, which won't happen if we DIST_INSTALL
|
||||
ifneq ($(OS_TARGET),Android)
|
||||
DIST_INSTALL = 1
|
||||
endif
|
||||
FORCE_STATIC_LIB= 1
|
||||
endif
|
||||
|
||||
EXPORTS = jemalloc.h jemalloc_types.h
|
||||
CSRCS = jemalloc.c
|
||||
|
||||
#XXX: PGO on Linux causes problems here
|
||||
# See bug 419470
|
||||
NO_PROFILE_GUIDED_OPTIMIZE = 1
|
||||
endif
|
||||
|
||||
ifdef WRAP_MALLOC_CFLAGS
|
||||
DEFINES += -DWRAP_MALLOC
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq (Darwin,$(OS_TARGET))
|
||||
|
@ -162,8 +96,6 @@ LDFLAGS += -init _jemalloc_darwin_init
|
|||
endif
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
ifndef WIN32_OLD_STYLE_JEMALLOC
|
||||
|
||||
# Roll our own custom logic here for the import library
|
||||
|
||||
###############################################################################
|
||||
|
@ -240,6 +172,4 @@ crtdll.obj: msvc_combined.lib
|
|||
# Grab both CRT libraries and combine them into one library to simplify things
|
||||
msvc_combined.lib:
|
||||
lib -OUT:$@ $(WIN32_CRT_LIBS)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
#!/bin/perl
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla build system.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Mozilla Foundation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2008
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ted Mielczarek <ted.mielczarek@gmail.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Usage: apply-ed-patches.pl <source patch> <target directory> <path to ed>
|
||||
|
||||
use FileHandle;
|
||||
|
||||
sub do_patch {
|
||||
my ($ed, $target_file, $patch_file, $fh) = @_;
|
||||
# these keep winding up read only for me
|
||||
chmod 0666, $target_file;
|
||||
print $fh "w\n";
|
||||
$fh->close();
|
||||
print "$ed -s $target_file < $patch_file\n";
|
||||
system "$ed -s $target_file < $patch_file\n";
|
||||
}
|
||||
|
||||
my $header_done = 0;
|
||||
my ($target_file,$patch_file) = ('','');
|
||||
my $source_patch = $ARGV[0];
|
||||
my $srcdir = $ARGV[1];
|
||||
my $ed = $ARGV[2];
|
||||
$srcdir = "$srcdir/" unless $srcdir =~ m|/$|;
|
||||
my $pfh = new FileHandle($source_patch, 'r');
|
||||
while(<$pfh>) {
|
||||
# skip initial comment header
|
||||
next if !$header_done && /^#/;
|
||||
$header_done = 1;
|
||||
|
||||
next if /^Only in/;
|
||||
if (/^diff -re (\S+)/) {
|
||||
my $new_file = $1;
|
||||
$new_file =~ s|^crt/src/||;
|
||||
$new_file = "$srcdir$new_file";
|
||||
my $new_patch_file = "$new_file.patch";
|
||||
|
||||
if ($target_file ne '') {
|
||||
do_patch $ed, $target_file, $patch_file, $fh;
|
||||
}
|
||||
$target_file = $new_file;
|
||||
$patch_file = $new_patch_file;
|
||||
$fh = new FileHandle($patch_file, 'w');
|
||||
next;
|
||||
}
|
||||
|
||||
print $fh $_ if $fh;
|
||||
}
|
||||
|
||||
do_patch $ed, $target_file, $patch_file, $fh;
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os, sys
|
||||
from subprocess import Popen, STDOUT, PIPE
|
||||
|
||||
if 'MAKEFLAGS' in os.environ:
|
||||
del os.environ['MAKEFLAGS']
|
||||
proc = Popen(['nmake', 'dll_', 'dll_p', 'mt'], stdout=PIPE, stderr=STDOUT,
|
||||
cwd=sys.argv[1])
|
||||
|
||||
while True:
|
||||
line = proc.stdout.readline()
|
||||
if line == '':
|
||||
break
|
||||
line = line.rstrip()
|
||||
# explicitly ignore this fatal-sounding non-fatal error
|
||||
if line == "NMAKE : fatal error U1052: file 'makefile.sub' not found" or line == "Stop.":
|
||||
continue
|
||||
print line
|
||||
sys.exit(proc.wait())
|
|
@ -1,235 +0,0 @@
|
|||
diff -re crt/src/AMD64/_sample_.def crtsrc/AMD64/_sample_.def
|
||||
1160d
|
||||
717,718d
|
||||
663a
|
||||
posix_memalign
|
||||
.
|
||||
637a
|
||||
memalign
|
||||
.
|
||||
494a
|
||||
malloc_usable_size
|
||||
jemalloc_stats
|
||||
.
|
||||
330,335d
|
||||
318d
|
||||
307,308d
|
||||
75d
|
||||
9c
|
||||
LIBRARY MOZCRT19
|
||||
.
|
||||
diff -re crt/src/_sample_.rc crtsrc/_sample_.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCRT19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCRT19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCRT19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCRT19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
Only in crtsrc/: build
|
||||
diff -re crt/src/crt0.c crtsrc/crt0.c
|
||||
273c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
101a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
.
|
||||
diff -re crt/src/crt0dat.c crtsrc/crt0dat.c
|
||||
789d
|
||||
778d
|
||||
diff -re crt/src/crtexe.c crtsrc/crtexe.c
|
||||
333,335d
|
||||
diff -re crt/src/crtheap.c crtsrc/crtheap.c
|
||||
61c
|
||||
pv = calloc(count, size);
|
||||
.
|
||||
58,59d
|
||||
diff -re crt/src/crtlib.c crtsrc/crtlib.c
|
||||
781,788d
|
||||
416d
|
||||
400a
|
||||
malloc_shutdown();
|
||||
|
||||
.
|
||||
359d
|
||||
340d
|
||||
310,311d
|
||||
300d
|
||||
287c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
43a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
extern void malloc_shutdown(void);
|
||||
|
||||
.
|
||||
diff -re crt/src/dllcrt0.c crtsrc/dllcrt0.c
|
||||
236,237d
|
||||
183d
|
||||
173d
|
||||
158d
|
||||
153,155d
|
||||
diff -re crt/src/gs_report.c crtsrc/gs_report.c
|
||||
23,41d
|
||||
diff -re crt/src/internal.h crtsrc/internal.h
|
||||
407a
|
||||
#endif
|
||||
.
|
||||
403a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/invarg.c crtsrc/invarg.c
|
||||
103a
|
||||
VOID NTAPI RtlCaptureContext (PCONTEXT ContextRecord);
|
||||
.
|
||||
diff -re crt/src/makefile crtsrc/makefile
|
||||
1840c
|
||||
-def:$(DEFFILE2_DIR)\sample_p.def
|
||||
.
|
||||
1816c
|
||||
$(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
|
||||
.
|
||||
1745a
|
||||
$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
|
||||
copy $** $@
|
||||
.
|
||||
1274d
|
||||
1228,1230d
|
||||
754c
|
||||
dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
|
||||
$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
|
||||
$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
|
||||
.
|
||||
334c
|
||||
CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
|
||||
.
|
||||
307,309c
|
||||
LINKER=link
|
||||
LINKLIB=link -lib
|
||||
LINKIMPLIB=link -lib
|
||||
.
|
||||
302,304c
|
||||
LINKER=link -nologo
|
||||
LINKLIB=link -lib -nologo
|
||||
LINKIMPLIB=link -lib -nologo
|
||||
.
|
||||
209d
|
||||
21,24c
|
||||
RETAIL_DLL_NAME=MOZCRT19
|
||||
RETAIL_LIB_NAME=mozcrt19
|
||||
RETAIL_DLLCPP_NAME=MOZCPP19
|
||||
RETAIL_LIBCPP_NAME=mozcpp19
|
||||
.
|
||||
diff -re crt/src/makefile.inc crtsrc/makefile.inc
|
||||
1624a
|
||||
$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
|
||||
copy $(PREOBJDIR)\unhandld.obj $@
|
||||
|
||||
.
|
||||
1134a
|
||||
$(OBJDIR)\memmove.obj \
|
||||
.
|
||||
618d
|
||||
402d
|
||||
342,353c
|
||||
$(OBJDIR)\jemalloc.obj \
|
||||
.
|
||||
334,335d
|
||||
329,330d
|
||||
327d
|
||||
323d
|
||||
320d
|
||||
diff -re crt/src/makefile.sub crtsrc/makefile.sub
|
||||
103c
|
||||
LIB=link -lib -nologo
|
||||
.
|
||||
69c
|
||||
CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1 -DMOZ_MEMORY_SIZEOF_PTR_2POW=3
|
||||
.
|
||||
67c
|
||||
CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1 -DMOZ_MEMORY_SIZEOF_PTR_2POW=3
|
||||
.
|
||||
diff -re crt/src/malloc.h crtsrc/malloc.h
|
||||
189a
|
||||
#endif
|
||||
.
|
||||
177a
|
||||
|
||||
#if 0
|
||||
.
|
||||
161d
|
||||
83a
|
||||
#endif
|
||||
.
|
||||
70a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/mlock.c crtsrc/mlock.c
|
||||
274c
|
||||
#endif
|
||||
.
|
||||
262a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/new.cpp crtsrc/new.cpp
|
||||
60d
|
||||
52,55d
|
||||
37,38c
|
||||
break;
|
||||
.
|
||||
diff -re crt/src/nothrownew.cpp crtsrc/nothrownew.cpp
|
||||
37a
|
||||
#endif
|
||||
.
|
||||
31a
|
||||
#if 1
|
||||
break;
|
||||
#else
|
||||
|
||||
.
|
||||
diff -re crt/src/sample_p.def crtsrc/sample_p.def
|
||||
8c
|
||||
LIBRARY MOZCPP19
|
||||
.
|
||||
diff -re crt/src/sample_p.rc crtsrc/sample_p.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C++ Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCPP19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCPP19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCPP19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCPP19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
diff -re crt/src/tidtable.c crtsrc/tidtable.c
|
||||
393,394d
|
|
@ -1,229 +0,0 @@
|
|||
# The Microsoft C Runtime source code to which this document refers is available
|
||||
# directly from Microsoft Corporation, under a separate license.
|
||||
# Please ensure that if you are using that source code, you have appropriate
|
||||
# rights to use it. By providing you access to this file, Mozilla Corporation
|
||||
# and its affiliates do not purport to grant any rights in that source code.
|
||||
# Binaries are available under separate licenses at
|
||||
# http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
|
||||
diff -re crt/src/_sample_.rc ./crtsrc/_sample_.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCRT19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCRT19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCRT19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCRT19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
diff -re crt/src/crt0.c ./crtsrc/crt0.c
|
||||
273c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
101a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
.
|
||||
diff -re crt/src/crt0dat.c ./crtsrc/crt0dat.c
|
||||
789d
|
||||
778d
|
||||
diff -re crt/src/crtexe.c ./crtsrc/crtexe.c
|
||||
333,335d
|
||||
diff -re crt/src/crtheap.c ./crtsrc/crtheap.c
|
||||
61c
|
||||
pv = calloc(count, size);
|
||||
.
|
||||
58,59d
|
||||
diff -re crt/src/crtlib.c ./crtsrc/crtlib.c
|
||||
781,788d
|
||||
416d
|
||||
400a
|
||||
malloc_shutdown();
|
||||
|
||||
.
|
||||
359d
|
||||
340d
|
||||
310,311d
|
||||
300d
|
||||
287c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
43a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
extern void malloc_shutdown(void);
|
||||
|
||||
.
|
||||
diff -re crt/src/dllcrt0.c ./crtsrc/dllcrt0.c
|
||||
236,237d
|
||||
183d
|
||||
173d
|
||||
158d
|
||||
153,155d
|
||||
diff -re crt/src/intel/_sample_.def ./crtsrc/intel/_sample_.def
|
||||
1208d
|
||||
723,724d
|
||||
669a
|
||||
posix_memalign
|
||||
.
|
||||
643a
|
||||
memalign
|
||||
.
|
||||
500a
|
||||
malloc_usable_size
|
||||
jemalloc_stats
|
||||
.
|
||||
336,341d
|
||||
324d
|
||||
313,314d
|
||||
81d
|
||||
9c
|
||||
LIBRARY MOZCRT19
|
||||
.
|
||||
diff -re crt/src/internal.h ./crtsrc/internal.h
|
||||
407a
|
||||
#endif
|
||||
.
|
||||
403a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/makefile ./crtsrc/makefile
|
||||
1840c
|
||||
-def:$(DEFFILE2_DIR)\sample_p.def
|
||||
.
|
||||
1816c
|
||||
$(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
|
||||
.
|
||||
1745a
|
||||
$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
|
||||
copy $** $@
|
||||
.
|
||||
1274d
|
||||
1228,1230d
|
||||
754c
|
||||
dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
|
||||
$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
|
||||
$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
|
||||
.
|
||||
334c
|
||||
CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
|
||||
.
|
||||
307,309c
|
||||
LINKER=link
|
||||
LINKLIB=link -lib
|
||||
LINKIMPLIB=link -lib
|
||||
.
|
||||
302,304c
|
||||
LINKER=link -nologo
|
||||
LINKLIB=link -lib -nologo
|
||||
LINKIMPLIB=link -lib -nologo
|
||||
.
|
||||
209d
|
||||
21,24c
|
||||
RETAIL_DLL_NAME=MOZCRT19
|
||||
RETAIL_LIB_NAME=mozcrt19
|
||||
RETAIL_DLLCPP_NAME=MOZCPP19
|
||||
RETAIL_LIBCPP_NAME=mozcpp19
|
||||
.
|
||||
diff -re crt/src/makefile.inc ./crtsrc/makefile.inc
|
||||
1624a
|
||||
$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
|
||||
copy $(PREOBJDIR)\unhandld.obj $@
|
||||
|
||||
.
|
||||
618d
|
||||
402d
|
||||
342,353c
|
||||
$(OBJDIR)\jemalloc.obj \
|
||||
.
|
||||
334,335d
|
||||
329,330d
|
||||
327d
|
||||
323d
|
||||
320d
|
||||
diff -re crt/src/makefile.sub ./crtsrc/makefile.sub
|
||||
103c
|
||||
LIB=link -lib -nologo
|
||||
.
|
||||
69c
|
||||
CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1
|
||||
.
|
||||
diff -re crt/src/malloc.h ./crtsrc/malloc.h
|
||||
189a
|
||||
#endif
|
||||
.
|
||||
177a
|
||||
|
||||
#if 0
|
||||
.
|
||||
161d
|
||||
83a
|
||||
#endif
|
||||
.
|
||||
70a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/mlock.c ./crtsrc/mlock.c
|
||||
274c
|
||||
#endif
|
||||
.
|
||||
262a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/new.cpp ./crtsrc/new.cpp
|
||||
60d
|
||||
52,55d
|
||||
37,38c
|
||||
break;
|
||||
.
|
||||
diff -re crt/src/nothrownew.cpp ./crtsrc/nothrownew.cpp
|
||||
37a
|
||||
#endif
|
||||
.
|
||||
31a
|
||||
#if 1
|
||||
break;
|
||||
#else
|
||||
|
||||
.
|
||||
diff -re crt/src/sample_p.def ./crtsrc/sample_p.def
|
||||
8c
|
||||
LIBRARY MOZCPP19
|
||||
.
|
||||
diff -re crt/src/sample_p.rc ./crtsrc/sample_p.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C++ Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCPP19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCPP19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCPP19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCPP19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
diff -re crt/src/tidtable.c ./crtsrc/tidtable.c
|
||||
393,394d
|
|
@ -1,250 +0,0 @@
|
|||
diff -re crt/src/AMD64/_sample_.def crtsrc/AMD64/_sample_.def
|
||||
1150d
|
||||
712,713d
|
||||
658a
|
||||
posix_memalign
|
||||
.
|
||||
632a
|
||||
memalign
|
||||
.
|
||||
489a
|
||||
malloc_usable_size
|
||||
.
|
||||
461a
|
||||
jemalloc_stats
|
||||
.
|
||||
325,330d
|
||||
313d
|
||||
307,308d
|
||||
75d
|
||||
9c
|
||||
LIBRARY MOZCRT19
|
||||
.
|
||||
diff -re crt/src/_sample_.rc crtsrc/_sample_.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCRT19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCRT19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCRT19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCRT19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
diff -re crt/src/crt0.c crtsrc/crt0.c
|
||||
212c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
87a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
.
|
||||
diff -re crt/src/crt0dat.c crtsrc/crt0dat.c
|
||||
837d
|
||||
826d
|
||||
diff -re crt/src/crtdll.c crtsrc/crtdll.c
|
||||
31,40d
|
||||
diff -re crt/src/crtexe.c crtsrc/crtexe.c
|
||||
322,324d
|
||||
35,45d
|
||||
diff -re crt/src/crtheap.c crtsrc/crtheap.c
|
||||
61c
|
||||
pv = calloc(count, size);
|
||||
.
|
||||
58,59d
|
||||
diff -re crt/src/crtlib.c crtsrc/crtlib.c
|
||||
686,693d
|
||||
355d
|
||||
339a
|
||||
malloc_shutdown();
|
||||
|
||||
.
|
||||
298d
|
||||
279d
|
||||
249,250d
|
||||
239d
|
||||
226c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
43a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
extern void malloc_shutdown(void);
|
||||
|
||||
.
|
||||
diff -re crt/src/dllcrt0.c crtsrc/dllcrt0.c
|
||||
189,190d
|
||||
136d
|
||||
126d
|
||||
111d
|
||||
106,108d
|
||||
diff -re crt/src/gs_report.c crtsrc/gs_report.c
|
||||
41c
|
||||
#endif
|
||||
.
|
||||
22c
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/intel/_sample_.def crtsrc/intel/_sample_.def
|
||||
1198d
|
||||
718,719d
|
||||
664a
|
||||
posix_memalign
|
||||
.
|
||||
638a
|
||||
memalign
|
||||
.
|
||||
495a
|
||||
malloc_usable_size
|
||||
.
|
||||
467a
|
||||
jemalloc_stats
|
||||
.
|
||||
331,336d
|
||||
319d
|
||||
313,314d
|
||||
81d
|
||||
9c
|
||||
LIBRARY MOZCRT19
|
||||
.
|
||||
diff -re crt/src/internal.h crtsrc/internal.h
|
||||
413a
|
||||
#endif
|
||||
.
|
||||
409c
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/invarg.c crtsrc/invarg.c
|
||||
53c
|
||||
#endif
|
||||
.
|
||||
34c
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/makefile crtsrc/makefile
|
||||
1873c
|
||||
-def:$(DEFFILE2_DIR)\sample_p.def
|
||||
.
|
||||
1841c
|
||||
$(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
|
||||
.
|
||||
1771a
|
||||
$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
|
||||
copy $** $@
|
||||
.
|
||||
1290d
|
||||
1235,1237d
|
||||
760c
|
||||
dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
|
||||
$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
|
||||
$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
|
||||
.
|
||||
340c
|
||||
CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
|
||||
.
|
||||
213d
|
||||
21,24c
|
||||
RETAIL_DLL_NAME=MOZCRT19
|
||||
RETAIL_LIB_NAME=mozcrt19
|
||||
RETAIL_DLLCPP_NAME=MOZCPP19
|
||||
RETAIL_LIBCPP_NAME=mozcpp19
|
||||
.
|
||||
diff -re crt/src/makefile.inc crtsrc/makefile.inc
|
||||
1636a
|
||||
$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
|
||||
copy $(PREOBJDIR)\unhandld.obj $@
|
||||
|
||||
.
|
||||
623d
|
||||
621d
|
||||
405d
|
||||
344,356c
|
||||
$(OBJDIR)\jemalloc.obj \
|
||||
.
|
||||
336,337d
|
||||
331,332d
|
||||
329d
|
||||
325d
|
||||
321,322d
|
||||
diff -re crt/src/makefile.sub crtsrc/makefile.sub
|
||||
66c
|
||||
CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1 -DMOZ_MEMORY_SIZEOF_PTR_2POW=3
|
||||
.
|
||||
diff -re crt/src/malloc.h crtsrc/malloc.h
|
||||
189a
|
||||
#endif
|
||||
.
|
||||
177a
|
||||
|
||||
#if 0
|
||||
.
|
||||
83a
|
||||
#endif
|
||||
.
|
||||
70a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/mlock.c crtsrc/mlock.c
|
||||
274c
|
||||
#endif
|
||||
.
|
||||
262a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/new.cpp crtsrc/new.cpp
|
||||
60d
|
||||
52,55d
|
||||
37,38c
|
||||
break;
|
||||
.
|
||||
diff -re crt/src/nothrownew.cpp crtsrc/nothrownew.cpp
|
||||
38c
|
||||
#endif
|
||||
.
|
||||
31a
|
||||
#if 1
|
||||
break;
|
||||
#else
|
||||
|
||||
.
|
||||
diff -re crt/src/sample_p.def crtsrc/sample_p.def
|
||||
8c
|
||||
LIBRARY mozcpp19
|
||||
.
|
||||
diff -re crt/src/sample_p.rc crtsrc/sample_p.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C++ Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCPP19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCPP19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCPP19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCPP19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
diff -re crt/src/tidtable.c crtsrc/tidtable.c
|
||||
360,361d
|
|
@ -1,221 +0,0 @@
|
|||
# The Microsoft C Runtime source code to which this document refers is available
|
||||
# directly from Microsoft Corporation, under a separate license.
|
||||
# Please ensure that if you are using that source code, you have appropriate
|
||||
# rights to use it. By providing you access to this file, Mozilla Corporation
|
||||
# and its affiliates do not purport to grant any rights in that source code.
|
||||
# Binaries are available under separate licenses at
|
||||
# http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
|
||||
diff -re crt/src/_sample_.rc crtsrc/_sample_.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCRT19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCRT19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCRT19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCRT19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
diff -re crt/src/crt0.c crtsrc/crt0.c
|
||||
212c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
87a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
.
|
||||
diff -re crt/src/crt0dat.c crtsrc/crt0dat.c
|
||||
837d
|
||||
826d
|
||||
diff -re crt/src/crtdll.c crtsrc/crtdll.c
|
||||
31,40d
|
||||
diff -re crt/src/crtexe.c crtsrc/crtexe.c
|
||||
322,324d
|
||||
35,45d
|
||||
diff -re crt/src/crtheap.c crtsrc/crtheap.c
|
||||
61c
|
||||
pv = calloc(count, size);
|
||||
.
|
||||
58,59d
|
||||
diff -re crt/src/crtlib.c crtsrc/crtlib.c
|
||||
686,693d
|
||||
355d
|
||||
339a
|
||||
malloc_shutdown();
|
||||
|
||||
.
|
||||
298d
|
||||
279d
|
||||
249,250d
|
||||
239d
|
||||
226c
|
||||
/*
|
||||
* this used to happen in _mtinit, but we need it before malloc
|
||||
*/
|
||||
_init_pointers(); /* initialize global function pointers */
|
||||
|
||||
if ( malloc_init_hard() ) /* initialize heap */
|
||||
.
|
||||
43a
|
||||
extern BOOL malloc_init_hard(void);
|
||||
extern void malloc_shutdown(void);
|
||||
|
||||
.
|
||||
diff -re crt/src/dllcrt0.c crtsrc/dllcrt0.c
|
||||
189,190d
|
||||
136d
|
||||
126d
|
||||
111d
|
||||
106,108d
|
||||
diff -re crt/src/intel/_sample_.def crtsrc/intel/_sample_.def
|
||||
1198d
|
||||
718,719d
|
||||
664a
|
||||
posix_memalign
|
||||
.
|
||||
638a
|
||||
memalign
|
||||
.
|
||||
495a
|
||||
malloc_usable_size
|
||||
.
|
||||
467a
|
||||
jemalloc_stats
|
||||
.
|
||||
331,336d
|
||||
319d
|
||||
313,314d
|
||||
81d
|
||||
9c
|
||||
LIBRARY MOZCRT19
|
||||
.
|
||||
diff -re crt/src/internal.h crtsrc/internal.h
|
||||
413a
|
||||
#endif
|
||||
.
|
||||
409c
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/makefile crtsrc/makefile
|
||||
1873c
|
||||
-def:$(DEFFILE2_DIR)\sample_p.def
|
||||
.
|
||||
1841c
|
||||
$(DEFFILE2_DIR)\sample_p.def $(CPPSRC_OBJS_DLL:*=dll) \
|
||||
.
|
||||
1771a
|
||||
$(DEFFILE_DIR)\$(RETAIL_LIB_NAME).def : $(DEFFILE_DIR)\_sample_.def
|
||||
copy $** $@
|
||||
.
|
||||
1290d
|
||||
1235,1237d
|
||||
760c
|
||||
dll_ :: $(OBJROOT) $(OBJCPUDIR) $(OBJDIR_DLL) $(OBJDIR_DLL)\$(PURE_OBJ_DIR) \
|
||||
$(OBJDIR_DLL)\$(CPP_OBJ_DIR) \
|
||||
$(RELDIR_CPU) $(PDBDIR_CPU_DLL) $(MAKE_DIRS_DLL)
|
||||
.
|
||||
340c
|
||||
CC_OPTS_BASE=-c -nologo -Zlp8 -W3 -GFy -DWIND32
|
||||
.
|
||||
213d
|
||||
21,24c
|
||||
RETAIL_DLL_NAME=MOZCRT19
|
||||
RETAIL_LIB_NAME=mozcrt19
|
||||
RETAIL_DLLCPP_NAME=MOZCPP19
|
||||
RETAIL_LIBCPP_NAME=mozcpp19
|
||||
.
|
||||
diff -re crt/src/makefile.inc crtsrc/makefile.inc
|
||||
1636a
|
||||
$(OBJDIR)\unhandld.obj: $(PREOBJDIR)\unhandld.obj
|
||||
copy $(PREOBJDIR)\unhandld.obj $@
|
||||
|
||||
.
|
||||
623d
|
||||
621d
|
||||
405d
|
||||
344,356c
|
||||
$(OBJDIR)\jemalloc.obj \
|
||||
.
|
||||
336,337d
|
||||
331,332d
|
||||
329d
|
||||
325d
|
||||
321,322d
|
||||
diff -re crt/src/makefile.sub crtsrc/makefile.sub
|
||||
66c
|
||||
CFLAGS=$(CFLAGS) -O2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_WINDOWS=1
|
||||
.
|
||||
diff -re crt/src/malloc.h crtsrc/malloc.h
|
||||
189a
|
||||
#endif
|
||||
.
|
||||
177a
|
||||
|
||||
#if 0
|
||||
.
|
||||
83a
|
||||
#endif
|
||||
.
|
||||
70a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/mlock.c crtsrc/mlock.c
|
||||
274c
|
||||
#endif
|
||||
.
|
||||
262a
|
||||
#if 0
|
||||
.
|
||||
diff -re crt/src/new.cpp crtsrc/new.cpp
|
||||
60d
|
||||
52,55d
|
||||
37,38c
|
||||
break;
|
||||
.
|
||||
diff -re crt/src/nothrownew.cpp crtsrc/nothrownew.cpp
|
||||
38c
|
||||
#endif
|
||||
.
|
||||
31a
|
||||
#if 1
|
||||
break;
|
||||
#else
|
||||
|
||||
.
|
||||
diff -re crt/src/sample_p.def crtsrc/sample_p.def
|
||||
8c
|
||||
LIBRARY mozcpp19
|
||||
.
|
||||
diff -re crt/src/sample_p.rc crtsrc/sample_p.rc
|
||||
41c
|
||||
VALUE "ProductName", "Mozilla Custom C++ Runtime"
|
||||
.
|
||||
39c
|
||||
VALUE "OriginalFilename", "MOZCPP19.DLL"
|
||||
.
|
||||
37c
|
||||
VALUE "OriginalFilename", "MOZCPP19D.DLL"
|
||||
.
|
||||
33c
|
||||
VALUE "InternalName", "MOZCPP19.DLL"
|
||||
.
|
||||
31c
|
||||
VALUE "InternalName", "MOZCPP19D.DLL"
|
||||
.
|
||||
27c
|
||||
VALUE "CompanyName", "Mozilla Foundation"
|
||||
.
|
||||
diff -re crt/src/tidtable.c crtsrc/tidtable.c
|
||||
360,361d
|
Двоичные данные
memory/jemalloc/ed.exe
Двоичные данные
memory/jemalloc/ed.exe
Двоичный файл не отображается.
|
@ -203,17 +203,9 @@
|
|||
|
||||
#ifdef MOZ_MEMORY_WINDOWS
|
||||
|
||||
/* XXXkhuey switch to not patching the CRT for jemalloc all the time */
|
||||
/* We use ifndef NEW_STYLE here because when we're build as part of the CRT
|
||||
we don't have access to AC_DEFINEs */
|
||||
#ifndef WIN32_NEW_STYLE_JEMALLOC
|
||||
#include <cruntime.h>
|
||||
#include <internal.h>
|
||||
#else
|
||||
/* Some defines from the CRT internal headers that we need here. */
|
||||
#define _CRT_SPINCOUNT 5000
|
||||
#define __crtInitCritSecAndSpinCount InitializeCriticalSectionAndSpinCount
|
||||
#endif
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
|
||||
|
@ -5848,30 +5840,54 @@ malloc_shutdown()
|
|||
/*
|
||||
* Mangle standard interfaces, in order to avoid linking problems.
|
||||
*/
|
||||
#if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_ANDROID) || \
|
||||
defined(WRAP_MALLOC) || defined(WIN32_NEW_STYLE_JEMALLOC)
|
||||
inline void sys_free(void* ptr) {return free(ptr);}
|
||||
#define malloc(a) je_malloc(a)
|
||||
#if defined(WIN32_NEW_STYLE_JEMALLOC) || defined(MOZ_MEMORY_DARWIN)
|
||||
#define memalign(a, b) je_memalign(a, b)
|
||||
#endif
|
||||
#define posix_memalign(a, b, c) je_posix_memalign(a, b, c)
|
||||
#define valloc(a) je_valloc(a)
|
||||
#define calloc(a, b) je_calloc(a, b)
|
||||
#define realloc(a, b) je_realloc(a, b)
|
||||
#define free(a) je_free(a)
|
||||
#define malloc_usable_size(a) je_malloc_usable_size(a)
|
||||
|
||||
#if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_WINDOWS) || \
|
||||
defined(MOZ_MEMORY_ANDROID)
|
||||
|
||||
char *je_strndup(const char *src, size_t len) {
|
||||
char* dst = (char*)je_malloc(len + 1);
|
||||
if(dst)
|
||||
strncpy(dst, src, len + 1);
|
||||
return dst;
|
||||
#ifdef MOZ_MEMORY_ANDROID
|
||||
/*
|
||||
* On Android, we use __wrap_* instead of je_* to accomodate with the
|
||||
* linker's --wrap option we use. That option prefixes the function
|
||||
* names it is given with __wrap_.
|
||||
*/
|
||||
#define wrap(a) __wrap_ ## a
|
||||
|
||||
/* Extra wrappers for NSPR alloc functions */
|
||||
void *
|
||||
__wrap_PR_Malloc(size_t size) __attribute__((alias("__wrap_malloc")));
|
||||
void *
|
||||
__wrap_PR_Calloc(size_t num, size_t size) __attribute__((alias("__wrap_calloc")));
|
||||
void *
|
||||
__wrap_PR_Realloc(void *ptr, size_t size) __attribute__((alias("__wrap_realloc")));
|
||||
void
|
||||
__wrap_PR_Free(void *ptr) __attribute__((alias("__wrap_free")));
|
||||
|
||||
#else
|
||||
#define wrap(a) je_ ## a
|
||||
#endif
|
||||
|
||||
#define malloc(a) wrap(malloc)(a)
|
||||
#define memalign(a, b) wrap(memalign)(a, b)
|
||||
#define posix_memalign(a, b, c) wrap(posix_memalign)(a, b, c)
|
||||
#define valloc(a) wrap(valloc)(a)
|
||||
#define calloc(a, b) wrap(calloc)(a, b)
|
||||
#define realloc(a, b) wrap(realloc)(a, b)
|
||||
#define free(a) wrap(free)(a)
|
||||
#define malloc_usable_size(a) wrap(malloc_usable_size)(a)
|
||||
|
||||
void *malloc(size_t size);
|
||||
|
||||
char *
|
||||
wrap(strndup)(const char *src, size_t len) {
|
||||
char* dst = (char*) malloc(len + 1);
|
||||
if (dst)
|
||||
strncpy(dst, src, len + 1);
|
||||
return dst;
|
||||
}
|
||||
char *je_strdup(const char *src) {
|
||||
size_t len = strlen(src);
|
||||
return je_strndup(src, len );
|
||||
|
||||
char *
|
||||
wrap(strdup)(const char *src) {
|
||||
size_t len = strlen(src);
|
||||
return wrap(strndup)(src, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -6020,9 +6036,8 @@ RETURN:
|
|||
}
|
||||
|
||||
#ifdef MOZ_MEMORY_ELF
|
||||
extern __typeof(memalign_internal)
|
||||
memalign __attribute__((alias ("memalign_internal"),
|
||||
visibility ("default")));
|
||||
extern void *
|
||||
memalign(size_t alignment, size_t size) __attribute__((alias ("memalign_internal"), visibility ("default")));
|
||||
#endif
|
||||
|
||||
int
|
||||
|
@ -6779,12 +6794,10 @@ jemalloc_darwin_init(void)
|
|||
* passed an extra argument for the caller return address, which will be
|
||||
* ignored.
|
||||
*/
|
||||
#ifndef WRAP_MALLOC
|
||||
void (*__free_hook)(void *ptr) = free;
|
||||
void *(*__malloc_hook)(size_t size) = malloc;
|
||||
void *(*__realloc_hook)(void *ptr, size_t size) = realloc;
|
||||
void *(*__memalign_hook)(size_t alignment, size_t size) = MEMALIGN;
|
||||
#endif
|
||||
|
||||
#elif defined(RTLD_DEEPBIND)
|
||||
/*
|
||||
|
@ -6795,7 +6808,7 @@ void *(*__memalign_hook)(size_t alignment, size_t size) = MEMALIGN;
|
|||
# error "Interposing malloc is unsafe on this system without libc malloc hooks."
|
||||
#endif
|
||||
|
||||
#ifdef WIN32_NEW_STYLE_JEMALLOC
|
||||
#ifdef MOZ_MEMORY_WINDOWS
|
||||
/*
|
||||
* In the new style jemalloc integration jemalloc is built as a separate
|
||||
* shared library. Since we're no longer hooking into the CRT binary,
|
||||
|
|
|
@ -50,8 +50,12 @@ void free(void *ptr);
|
|||
int posix_memalign(void **memptr, size_t alignment, size_t size);
|
||||
#endif /* MOZ_MEMORY_DARWIN, MOZ_MEMORY_LINUX */
|
||||
|
||||
#if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_ANDROID) || \
|
||||
defined(WRAP_MALLOC) || defined(WIN32_NEW_STYLE_JEMALLOC)
|
||||
/* Android doesn't have posix_memalign */
|
||||
#ifdef MOZ_MEMORY_ANDROID
|
||||
int posix_memalign(void **memptr, size_t alignment, size_t size);
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_WINDOWS)
|
||||
void *je_malloc(size_t size);
|
||||
void *je_valloc(size_t size);
|
||||
void *je_calloc(size_t num, size_t size);
|
||||
|
@ -61,12 +65,8 @@ void *je_memalign(size_t alignment, size_t size);
|
|||
int je_posix_memalign(void **memptr, size_t alignment, size_t size);
|
||||
char *je_strndup(const char *src, size_t len);
|
||||
char *je_strdup(const char *src);
|
||||
#if defined(MOZ_MEMORY_ANDROID)
|
||||
size_t je_malloc_usable_size(void *ptr);
|
||||
#else
|
||||
size_t je_malloc_usable_size(const void *ptr);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Linux has memalign and malloc_usable_size */
|
||||
#if !defined(MOZ_MEMORY_LINUX)
|
||||
|
|
|
@ -55,16 +55,6 @@ FORCE_SHARED_LIB= 1
|
|||
DIST_INSTALL = 1
|
||||
|
||||
ifdef MOZ_MEMORY
|
||||
ifneq (,$(findstring mozalloc,$(WRAP_MALLOC_LIB)))
|
||||
EXTRA_DSO_LDOPTS += $(DIST)/lib/libjemalloc.a
|
||||
WRAP_MALLOC_LIB=
|
||||
WRAP_MALLOC_CFLAGS=
|
||||
DEFINES += -DWRAP_MALLOC_WITH_JEMALLOC
|
||||
CSRCS = ld_malloc_wrappers.c
|
||||
ifeq (,$(filter-out Linux,$(OS_TARGET)))
|
||||
EXTRA_DSO_LDOPTS += -lpthread
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
EXTRA_DSO_LDOPTS += -L$(DIST)/lib -ljemalloc
|
||||
endif
|
||||
|
|
|
@ -1,140 +0,0 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brad Lassey <blassey@mozilla.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <stddef.h> // for size_t
|
||||
#include <stdlib.h> // for malloc, free
|
||||
#include "mozalloc.h"
|
||||
#include <malloc.h>
|
||||
|
||||
#ifdef __malloc_hook
|
||||
static void* moz_malloc_hook(size_t size, const void *caller)
|
||||
{
|
||||
return moz_malloc(size);
|
||||
}
|
||||
|
||||
static void* moz_realloc_hook(void *ptr, size_t size, const void *caller)
|
||||
{
|
||||
return moz_realloc(ptr, size);
|
||||
}
|
||||
|
||||
static void moz_free_hook(void *ptr, const void *caller)
|
||||
{
|
||||
moz_free(ptr);
|
||||
}
|
||||
|
||||
static void* moz_memalign_hook(size_t align, size_t size, const void *caller)
|
||||
{
|
||||
return moz_memalign(align, size);
|
||||
}
|
||||
|
||||
static void
|
||||
moz_malloc_init_hook (void)
|
||||
{
|
||||
__malloc_hook = moz_malloc_hook;
|
||||
__realloc_hook = moz_realloc_hook;
|
||||
__free_hook = moz_free_hook;
|
||||
__memalign_hook = moz_memalign_hook;
|
||||
}
|
||||
|
||||
/* Override initializing hook from the C library. */
|
||||
void (*__malloc_initialize_hook) (void) = moz_malloc_init_hook;
|
||||
#endif
|
||||
|
||||
inline void __wrap_free(void* ptr)
|
||||
{
|
||||
moz_free(ptr);
|
||||
}
|
||||
|
||||
inline void* __wrap_malloc(size_t size)
|
||||
{
|
||||
return moz_malloc(size);
|
||||
}
|
||||
|
||||
inline void* __wrap_realloc(void* ptr, size_t size)
|
||||
{
|
||||
return moz_realloc(ptr, size);
|
||||
}
|
||||
|
||||
inline void* __wrap_calloc(size_t num, size_t size)
|
||||
{
|
||||
return moz_calloc(num, size);
|
||||
}
|
||||
|
||||
inline void* __wrap_valloc(size_t size)
|
||||
{
|
||||
return moz_valloc(size);
|
||||
}
|
||||
|
||||
inline void* __wrap_memalign(size_t align, size_t size)
|
||||
{
|
||||
return moz_memalign(align, size);
|
||||
}
|
||||
|
||||
inline char* __wrap_strdup(char* str)
|
||||
{
|
||||
return moz_strdup(str);
|
||||
}
|
||||
|
||||
inline char* __wrap_strndup(const char* str, size_t size) {
|
||||
return moz_strndup(str, size);
|
||||
}
|
||||
|
||||
|
||||
inline void __wrap_PR_Free(void* ptr)
|
||||
{
|
||||
moz_free(ptr);
|
||||
}
|
||||
|
||||
inline void* __wrap_PR_Malloc(size_t size)
|
||||
{
|
||||
return moz_malloc(size);
|
||||
}
|
||||
|
||||
inline void* __wrap_PR_Realloc(void* ptr, size_t size)
|
||||
{
|
||||
return moz_realloc(ptr, size);
|
||||
}
|
||||
|
||||
inline void* __wrap_PR_Calloc(size_t num, size_t size)
|
||||
{
|
||||
return moz_calloc(num, size);
|
||||
}
|
||||
|
||||
inline int __wrap_posix_memalign(void **memptr, size_t alignment, size_t size)
|
||||
{
|
||||
return moz_posix_memalign(memptr, alignment, size);
|
||||
}
|
|
@ -76,26 +76,19 @@
|
|||
#define UNLIKELY(x) (x)
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_MEMORY_DARWIN) || defined(MOZ_MEMORY_ANDROID) || \
|
||||
defined(WRAP_MALLOC_WITH_JEMALLOC)
|
||||
#ifdef MOZ_MEMORY_DARWIN
|
||||
#include "jemalloc.h"
|
||||
#define malloc(a) je_malloc(a)
|
||||
#define posix_memalign(a, b, c) je_posix_memalign(a, b, c)
|
||||
#define valloc(a) je_valloc(a)
|
||||
#define calloc(a, b) je_calloc(a, b)
|
||||
#ifndef MOZ_MEMORY_DARWIN
|
||||
// These functions could be passed a memory region that was not allocated by
|
||||
// jemalloc, so use the system-provided functions, which will in turn call
|
||||
// the jemalloc versions when appropriate.
|
||||
# define realloc(a, b) je_realloc(a, b)
|
||||
# define free(a) je_free(a)
|
||||
# define malloc_usable_size(a) je_malloc_usable_size(a)
|
||||
#endif
|
||||
#ifndef MOZ_MEMORY_ANDROID
|
||||
#define memalign(a, b) je_memalign(a, b)
|
||||
#endif
|
||||
#define strdup(a) je_strdup(a)
|
||||
#define strndup(a, b) je_strndup(a, b)
|
||||
/* We omit functions which could be passed a memory region that was not
|
||||
* allocated by jemalloc (realloc, free and malloc_usable_size). Instead,
|
||||
* we use the system-provided functions, which will in turn call the
|
||||
* jemalloc versions when appropriate */
|
||||
#endif
|
||||
|
||||
void
|
||||
|
|
|
@ -48,6 +48,7 @@ PREF_JS_EXPORTS = $(srcdir)/mobile.js
|
|||
DIST_FILES = application.ini
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
ifneq (Android,$(OS_TARGET))
|
||||
PROGRAM=$(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
|
||||
CPPSRCS = nsBrowserApp.cpp
|
||||
|
@ -75,6 +76,7 @@ ifdef _MSC_VER
|
|||
# a console application.
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
endif
|
||||
endif #LIBXUL_SDK
|
||||
|
||||
# Make sure the standalone glue doesn't try to get libxpcom.so from mobile/app.
|
||||
|
|
|
@ -58,7 +58,9 @@
|
|||
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
|
||||
#endif
|
||||
#ifdef XP_WIN32
|
||||
#ifndef MOZ_MEMORY
|
||||
#ifdef MOZ_MEMORY
|
||||
@BINPATH@/jemalloc.dll
|
||||
#endif
|
||||
#if _MSC_VER == 1400
|
||||
@BINPATH@/Microsoft.VC80.CRT.manifest
|
||||
@BINPATH@/msvcm80.dll
|
||||
|
@ -73,11 +75,9 @@
|
|||
@BINPATH@/msvcp100.dll
|
||||
@BINPATH@/msvcr100.dll
|
||||
#endif
|
||||
#else
|
||||
@BINPATH@/mozcrt19.dll
|
||||
@BINPATH@/mozcpp19.dll
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
@BINPATH@/AndroidManifest.xml
|
||||
@BINPATH@/resources.arsc
|
||||
|
|
|
@ -2,3 +2,7 @@ README.txt
|
|||
#if MOZ_UPDATE_CHANNEL != beta
|
||||
extensions/feedback@mobile.mozilla.org.xpi
|
||||
#endif
|
||||
#ifdef XP_WIN
|
||||
mozcrt19.dll
|
||||
mozcpp19.dll
|
||||
#endif
|
||||
|
|
|
@ -74,6 +74,10 @@ EXPORTS = APKOpen.h
|
|||
|
||||
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
|
||||
|
||||
ifdef MOZ_MEMORY
|
||||
SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
|
||||
endif
|
||||
|
||||
WRAP_MALLOC_LIB =
|
||||
WRAP_MALLOC_CFLAGS =
|
||||
|
||||
|
|
|
@ -144,6 +144,8 @@ ifneq (,$(filter mingw%,$(host_os)))
|
|||
ABS_DIST := $(shell cd $(DIST) && pwd -W)
|
||||
endif
|
||||
endif
|
||||
# For all variables such as DLLFLAGS, that may contain $(DIST)
|
||||
DIST := $(ABS_DIST)
|
||||
NSPR_INCLUDE_DIR = $(firstword $(filter -I%,$(NSPR_CFLAGS)))
|
||||
ifneq (,$(strip $(NSPR_INCLUDE_DIR)))
|
||||
NSPR_INCLUDE_DIR := $(subst -I,,$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_INCLUDE_DIR)))
|
||||
|
|
|
@ -90,7 +90,20 @@ JSSHELL_BINS = \
|
|||
ifndef MOZ_NATIVE_NSPR
|
||||
JSSHELL_BINS += $(DIST)/bin/$(LIB_PREFIX)nspr4$(DLL_SUFFIX)
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
JSSHELL_BINS += $(DIST)/bin/mozcrt19$(DLL_SUFFIX)
|
||||
ifdef MOZ_MEMORY
|
||||
JSSHELL_BINS += $(DIST)/bin/jemalloc$(DLL_SUFFIX)
|
||||
endif
|
||||
ifeq ($(_MSC_VER),1400)
|
||||
JSSHELL_BINS += $(DIST)/bin/Microsoft.VC80.CRT.manifest
|
||||
JSSHELL_BINS += $(DIST)/bin/msvcr80.dll
|
||||
endif
|
||||
ifeq ($(_MSC_VER),1500)
|
||||
JSSHELL_BINS += $(DIST)/bin/Microsoft.VC90.CRT.manifest
|
||||
JSSHELL_BINS += $(DIST)/bin/msvcr90.dll
|
||||
endif
|
||||
ifeq ($(_MSC_VER),1500)
|
||||
JSSHELL_BINS += $(DIST)/bin/msvcr100.dll
|
||||
endif
|
||||
else
|
||||
JSSHELL_BINS += \
|
||||
$(DIST)/bin/$(LIB_PREFIX)plds4$(DLL_SUFFIX) \
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
#include "nsIObjectOutputStream.h"
|
||||
#include "nsIPipe.h"
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsILocalFileMac.h"
|
||||
#include "nsIMacUtils.h"
|
||||
#endif
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
COMPONENT(WINDOWSREGKEY, nsWindowsRegKeyConstructor)
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
COMPONENT(MACUTILSIMPL, nsMacUtilsImplConstructor)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **)
|
|||
#include "nsWindowsRegKey.h"
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsMacUtilsImpl.h"
|
||||
#endif
|
||||
|
||||
|
@ -215,7 +215,7 @@ NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT(nsProperties, Init)
|
|||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUUIDGenerator, Init)
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacUtilsImpl)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "prprf.h"
|
||||
#if defined(XP_WIN)
|
||||
#include <windows.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
#elif defined(MOZ_WIDGET_COCOA)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#elif defined(MOZ_WIDGET_GTK2)
|
||||
#include <gtk/gtk.h>
|
||||
|
@ -486,7 +486,7 @@ ParseManifestCommon(NSLocationType aType, nsILocalFile* aFile,
|
|||
info.dwMajorVersion,
|
||||
info.dwMinorVersion);
|
||||
}
|
||||
#elif defined(XP_MACOSX)
|
||||
#elif defined(MOZ_WIDGET_COCOA)
|
||||
SInt32 majorVersion, minorVersion;
|
||||
if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) &&
|
||||
(Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) {
|
||||
|
|
|
@ -563,7 +563,7 @@ GetSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory,
|
|||
}
|
||||
return NS_NewNativeLocalFile(tString, PR_TRUE, aFile);
|
||||
}
|
||||
#elif defined(XP_MACOSX)
|
||||
#elif defined(MOZ_WIDGET_COCOA)
|
||||
{
|
||||
return GetOSXFolderType(kUserDomain, kTemporaryFolderType, aFile);
|
||||
}
|
||||
|
@ -897,7 +897,7 @@ GetSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory,
|
|||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
#if defined (XP_MACOSX)
|
||||
#if defined (MOZ_WIDGET_COCOA)
|
||||
nsresult
|
||||
GetOSXFolderType(short aDomain, OSType aFolderType, nsILocalFile **localFile)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "nscore.h"
|
||||
#include "nsILocalFile.h"
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
#include <Carbon/Carbon.h>
|
||||
#include "nsILocalFileMac.h"
|
||||
#include "prenv.h"
|
||||
|
@ -131,7 +131,7 @@ enum SystemDirectories {
|
|||
nsresult
|
||||
GetSpecialSystemDirectory(SystemDirectories aSystemSystemDirectory,
|
||||
nsILocalFile** aFile);
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
nsresult
|
||||
GetOSXFolderType(short aDomain, OSType aFolderType, nsILocalFile **localFile);
|
||||
#endif
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "prenv.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
#include <Carbon/Carbon.h>
|
||||
#include "nsILocalFileMac.h"
|
||||
#elif defined(XP_OS2)
|
||||
|
@ -68,7 +68,7 @@
|
|||
// WARNING: These hard coded names need to go away. They need to
|
||||
// come from localizable resources
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
#define APP_REGISTRY_NAME NS_LITERAL_CSTRING("Application Registry")
|
||||
#define ESSENTIAL_FILES NS_LITERAL_CSTRING("Essential Files")
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
|
@ -84,7 +84,7 @@
|
|||
#define NS_ENV_PLUGINS_DIR "EnvPlugins" // env var MOZ_PLUGIN_PATH
|
||||
#define NS_USER_PLUGINS_DIR "UserPlugins"
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
#define NS_MACOSX_USER_PLUGIN_DIR "OSXUserPlugins"
|
||||
#define NS_MACOSX_LOCAL_PLUGIN_DIR "OSXLocalPlugins"
|
||||
#define NS_MACOSX_JAVA2_PLUGIN_DIR "OSXJavaPlugins"
|
||||
|
@ -128,7 +128,7 @@ nsAppFileLocationProvider::GetFile(const char *prop, PRBool *persistent, nsIFile
|
|||
*_retval = nsnull;
|
||||
*persistent = PR_TRUE;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
FSRef fileRef;
|
||||
nsCOMPtr<nsILocalFileMac> macFile;
|
||||
#endif
|
||||
|
@ -194,7 +194,7 @@ nsAppFileLocationProvider::GetFile(const char *prop, PRBool *persistent, nsIFile
|
|||
if (NS_SUCCEEDED(rv))
|
||||
rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
|
||||
}
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
|
||||
{
|
||||
if (::FSFindFolder(kUserDomain, kInternetPlugInFolderType, false, &fileRef) == noErr) {
|
||||
|
@ -324,7 +324,7 @@ NS_METHOD nsAppFileLocationProvider::GetProductDirectory(nsILocalFile **aLocalFi
|
|||
PRBool exists;
|
||||
nsCOMPtr<nsILocalFile> localDir;
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
FSRef fsRef;
|
||||
OSType folderType = aLocal ? (OSType) kCachedDataFolderType : (OSType) kDomainLibraryFolderType;
|
||||
OSErr err = ::FSFindFolder(kUserDomain, folderType, kCreateFolder, &fsRef);
|
||||
|
@ -395,7 +395,7 @@ NS_METHOD nsAppFileLocationProvider::GetDefaultUserProfileRoot(nsILocalFile **aL
|
|||
rv = GetProductDirectory(getter_AddRefs(localDir), aLocal);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
#if defined(XP_MACOSX) || defined(XP_OS2) || defined(XP_WIN)
|
||||
#if defined(MOZ_WIDGET_COCOA) || defined(XP_OS2) || defined(XP_WIN)
|
||||
// These 3 platforms share this part of the path - do them as one
|
||||
rv = localDir->AppendRelativeNativePath(NS_LITERAL_CSTRING("Profiles"));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
@ -552,7 +552,7 @@ nsAppFileLocationProvider::GetFiles(const char *prop, nsISimpleEnumerator **_ret
|
|||
|
||||
if (!nsCRT::strcmp(prop, NS_APP_PLUGINS_DIR_LIST))
|
||||
{
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
// As of Java for Mac OS X 10.5 Update 10, Apple has (in effect) deprecated Java Plugin2 on
|
||||
// on OS X 10.5, and removed the soft link to it from /Library/Internet Plug-Ins/. Java
|
||||
// Plugin2 is still present and usable, but there are no longer any links to it in the
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/param.h>
|
||||
#include "prenv.h"
|
||||
#ifdef XP_MACOSX
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
@ -78,7 +78,7 @@
|
|||
// For Windows platform, We are choosing Appdata folder as HOME
|
||||
#if defined (XP_WIN)
|
||||
#define HOME_DIR NS_WIN_APPDATA_DIR
|
||||
#elif defined (XP_MACOSX)
|
||||
#elif defined (MOZ_WIDGET_COCOA)
|
||||
#define HOME_DIR NS_OSX_HOME_DIR
|
||||
#elif defined (XP_UNIX)
|
||||
#define HOME_DIR NS_UNIX_HOME_DIR
|
||||
|
@ -139,7 +139,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#elif defined(XP_MACOSX)
|
||||
#elif defined(MOZ_WIDGET_COCOA)
|
||||
// Works even if we're not bundled.
|
||||
CFBundleRef appBundle = CFBundleGetMainBundle();
|
||||
if (appBundle != nsnull)
|
||||
|
@ -615,7 +615,7 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
|
|||
rv = GetSpecialSystemDirectory(OS_CurrentWorkingDirectory, getter_AddRefs(localFile));
|
||||
}
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
else if (inAtom == nsDirectoryService::sDirectory)
|
||||
{
|
||||
rv = GetOSXFolderType(kClassicDomain, kSystemFolderType, getter_AddRefs(localFile));
|
||||
|
|
|
@ -45,7 +45,7 @@ DIR_ATOM(sOS_CurrentWorkingDirectory, NS_OS_CURRENT_WORKING_DIR)
|
|||
DIR_ATOM(sOS_HomeDirectory, NS_OS_HOME_DIR)
|
||||
DIR_ATOM(sOS_DesktopDirectory, NS_OS_DESKTOP_DIR)
|
||||
DIR_ATOM(sInitCurrentProcess_dummy, NS_XPCOM_INIT_CURRENT_PROCESS_DIR)
|
||||
#if defined (XP_MACOSX)
|
||||
#if defined (MOZ_WIDGET_COCOA)
|
||||
DIR_ATOM(sDirectory, NS_OS_SYSTEM_DIR)
|
||||
DIR_ATOM(sTrashDirectory, NS_MAC_TRASH_DIR)
|
||||
DIR_ATOM(sStartupDirectory, NS_MAC_STARTUP_DIR)
|
||||
|
|
|
@ -86,11 +86,11 @@
|
|||
|
||||
/* Platform Specific Locations */
|
||||
|
||||
#if !defined (XP_UNIX) || defined(XP_MACOSX)
|
||||
#if !defined (XP_UNIX) || defined(MOZ_WIDGET_COCOA)
|
||||
#define NS_OS_SYSTEM_DIR "SysD"
|
||||
#endif
|
||||
|
||||
#if defined (XP_MACOSX)
|
||||
#if defined (MOZ_WIDGET_COCOA)
|
||||
#define NS_MAC_DESKTOP_DIR NS_OS_DESKTOP_DIR
|
||||
#define NS_MAC_TRASH_DIR "Trsh"
|
||||
#define NS_MAC_STARTUP_DIR "Strt"
|
||||
|
|
|
@ -63,7 +63,7 @@ void NS_ShutdownLocalFile()
|
|||
nsLocalFile::GlobalShutdown();
|
||||
}
|
||||
|
||||
#if !defined(XP_MACOSX) && !defined(XP_WIN)
|
||||
#if !defined(MOZ_WIDGET_COCOA) && !defined(XP_WIN)
|
||||
NS_IMETHODIMP
|
||||
nsLocalFile::InitWithFile(nsILocalFile *aFile)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче