mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Replace custom stdlib implementations with the compiler defaults
This commit is contained in:
parent
be4773e168
commit
ef314d225f
3 changed files with 9 additions and 22 deletions
|
|
@ -16,19 +16,8 @@ option('--enable-jemalloc', env='MOZ_MEMORY',
|
||||||
def jemalloc(value, target, build_project, c_compiler):
|
def jemalloc(value, target, build_project, c_compiler):
|
||||||
if value.origin != 'default':
|
if value.origin != 'default':
|
||||||
return bool(value) or None
|
return bool(value) or None
|
||||||
|
# Default to the compiler/CRT allocator unless explicitly requested.
|
||||||
if build_project == 'js':
|
return None
|
||||||
return True
|
|
||||||
|
|
||||||
if target.kernel == 'Darwin' and target.cpu == 'x86_64':
|
|
||||||
# Don't enable by default on 32-bits OSX. See bug 702250.
|
|
||||||
return True
|
|
||||||
|
|
||||||
if target.kernel == 'WINNT' and c_compiler.type in ('msvc', 'clang-cl'):
|
|
||||||
return True
|
|
||||||
|
|
||||||
if target.kernel == 'Linux':
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
set_config('MOZ_MEMORY', jemalloc)
|
set_config('MOZ_MEMORY', jemalloc)
|
||||||
|
|
@ -77,13 +66,11 @@ option('--enable-replace-malloc',
|
||||||
|
|
||||||
@depends('--enable-replace-malloc', jemalloc, milestone, build_project)
|
@depends('--enable-replace-malloc', jemalloc, milestone, build_project)
|
||||||
def replace_malloc(value, jemalloc, milestone, build_project):
|
def replace_malloc(value, jemalloc, milestone, build_project):
|
||||||
# Enable on central for the debugging opportunities it adds.
|
|
||||||
if value and not jemalloc:
|
if value and not jemalloc:
|
||||||
die('--enable-replace-malloc requires --enable-jemalloc')
|
die('--enable-replace-malloc requires --enable-jemalloc')
|
||||||
if value.origin != 'default':
|
if value.origin != 'default':
|
||||||
return bool(value) or None
|
return bool(value) or None
|
||||||
if milestone.is_nightly and jemalloc and build_project != 'js':
|
return None
|
||||||
return True
|
|
||||||
|
|
||||||
set_config('MOZ_REPLACE_MALLOC', replace_malloc)
|
set_config('MOZ_REPLACE_MALLOC', replace_malloc)
|
||||||
set_define('MOZ_REPLACE_MALLOC', replace_malloc)
|
set_define('MOZ_REPLACE_MALLOC', replace_malloc)
|
||||||
|
|
|
||||||
|
|
@ -1035,8 +1035,8 @@ WINNT|Darwin|Android)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test -z "$GNU_CC"; then
|
if test -z "$GNU_CC"; then
|
||||||
STL_FLAGS="-I${DIST}/stl_wrappers"
|
STL_FLAGS=
|
||||||
WRAP_STL_INCLUDES=1
|
WRAP_STL_INCLUDES=
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -276,8 +276,8 @@ case "$target" in
|
||||||
|
|
||||||
unset _MSVC_VER_FILTER
|
unset _MSVC_VER_FILTER
|
||||||
|
|
||||||
WRAP_STL_INCLUDES=1
|
WRAP_STL_INCLUDES=
|
||||||
STL_FLAGS="-I${DIST}/stl_wrappers"
|
STL_FLAGS=
|
||||||
CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0"
|
CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0"
|
||||||
CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0"
|
CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0"
|
||||||
else
|
else
|
||||||
|
|
@ -1231,8 +1231,8 @@ Darwin)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test -z "$GNU_CC"; then
|
if test -z "$GNU_CC"; then
|
||||||
STL_FLAGS="-I${DIST}/stl_wrappers"
|
STL_FLAGS=
|
||||||
WRAP_STL_INCLUDES=1
|
WRAP_STL_INCLUDES=
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue