Skip to content

Commit

Permalink
Bug 1395070 - Remove the MOZ_MEMORY_$platform defines. r=njn
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : d98dc4afaec44a3c65e4e1ff34824f6f8c512c8d
  • Loading branch information
glandium committed Aug 30, 2017
1 parent 01f5dbf commit db9abf4
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions build/moz.configure/memory.configure
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def jemalloc(value, target, build_project, c_compiler):
if target.kernel == 'Linux':
return True

if value and target.kernel not in ('WINNT', 'Linux', 'Darwin', 'kFreeBSD',
'FreeBSD', 'NetBSD'):
die('--enable-jemalloc is not supported on %s', target.kernel)


set_config('MOZ_MEMORY', jemalloc)
set_define('MOZ_MEMORY', jemalloc)
Expand All @@ -47,29 +51,6 @@ def jemalloc_for_old_configure(jemalloc):
add_old_configure_arg(jemalloc_for_old_configure)


@depends(jemalloc, target)
def jemalloc_os_define(jemalloc, target):
if jemalloc:
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, target)
def jemalloc_os_define_android(jemalloc, target):
if jemalloc and target.os == 'Android':
return 'MOZ_MEMORY_ANDROID'

set_define(jemalloc_os_define_android, '1')


option('--enable-replace-malloc',
help='Enable ability to dynamically replace the malloc implementation')

Expand Down

0 comments on commit db9abf4

Please sign in to comment.