2013-04-01 18:36:59 +00:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:17 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2013-10-24 19:06:19 +00:00
|
|
|
NO_VISIBILITY_FLAGS = True
|
2013-03-19 18:47:00 +00:00
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'fallible.h',
|
|
|
|
'mozalloc.h',
|
|
|
|
'mozalloc_abort.h',
|
|
|
|
'mozalloc_oom.h',
|
2014-01-22 13:23:27 +00:00
|
|
|
'VolatileBuffer.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_MSVC_STL_WRAP__RAISE'] or CONFIG['MOZ_MSVC_STL_WRAP__Throw']:
|
|
|
|
build_msvc_wrappers = 1
|
|
|
|
else:
|
|
|
|
build_msvc_wrappers = 0
|
|
|
|
|
|
|
|
if CONFIG['WRAP_STL_INCLUDES']:
|
|
|
|
if CONFIG['GNU_CXX']:
|
|
|
|
EXPORTS.mozilla += ['throw_gcc.h']
|
|
|
|
elif CONFIG['_MSC_VER']:
|
2014-03-05 00:39:06 +00:00
|
|
|
DEFINES['_HAS_EXCEPTIONS'] = 0
|
2013-04-16 19:24:43 +00:00
|
|
|
if build_msvc_wrappers:
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'msvc_raise_wrappers.h',
|
|
|
|
'msvc_throw_wrapper.h',
|
|
|
|
'throw_msvc.h',
|
|
|
|
]
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'msvc_raise_wrappers.cpp',
|
|
|
|
'msvc_throw_wrapper.cpp',
|
|
|
|
]
|
|
|
|
|
2013-11-25 11:09:59 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'mozalloc.cpp',
|
|
|
|
'mozalloc_abort.cpp',
|
|
|
|
'mozalloc_oom.cpp',
|
|
|
|
]
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2014-01-22 13:23:27 +00:00
|
|
|
if CONFIG['OS_TARGET'] == 'Android':
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'VolatileBufferAshmem.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'Darwin':
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'VolatileBufferOSX.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['OS_TARGET'] == 'WINNT':
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'VolatileBufferWindows.cpp',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'VolatileBufferFallback.cpp',
|
|
|
|
]
|
|
|
|
|
2013-06-17 19:21:01 +00:00
|
|
|
LIBRARY_NAME = 'mozalloc'
|
|
|
|
|
2013-10-24 17:52:00 +00:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
FORCE_STATIC_LIB = True
|
2013-11-19 02:47:45 +00:00
|
|
|
else:
|
|
|
|
FORCE_SHARED_LIB = True
|
2013-11-27 13:55:07 +00:00
|
|
|
|
2014-02-10 22:57:01 +00:00
|
|
|
# The strndup declaration in string.h is in an ifdef __USE_GNU section
|
|
|
|
DEFINES['_GNU_SOURCE'] = True
|
2014-01-22 13:23:27 +00:00
|
|
|
|
|
|
|
TEST_TOOL_DIRS += ['tests']
|
2014-02-18 06:05:51 +00:00
|
|
|
|
|
|
|
GENERATED_INCLUDES += ['/xpcom']
|
2014-03-05 00:39:06 +00:00
|
|
|
|
|
|
|
DISABLE_STL_WRAPPING = True
|