michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: NO_VISIBILITY_FLAGS = True michael@0: michael@0: EXPORTS.mozilla += [ michael@0: 'fallible.h', michael@0: 'mozalloc.h', michael@0: 'mozalloc_abort.h', michael@0: 'mozalloc_oom.h', michael@0: 'VolatileBuffer.h', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_MSVC_STL_WRAP__RAISE'] or CONFIG['MOZ_MSVC_STL_WRAP__Throw']: michael@0: build_msvc_wrappers = 1 michael@0: else: michael@0: build_msvc_wrappers = 0 michael@0: michael@0: if CONFIG['WRAP_STL_INCLUDES']: michael@0: if CONFIG['GNU_CXX']: michael@0: EXPORTS.mozilla += ['throw_gcc.h'] michael@0: elif CONFIG['_MSC_VER']: michael@0: DEFINES['_HAS_EXCEPTIONS'] = 0 michael@0: if build_msvc_wrappers: michael@0: EXPORTS.mozilla += [ michael@0: 'msvc_raise_wrappers.h', michael@0: 'msvc_throw_wrapper.h', michael@0: 'throw_msvc.h', michael@0: ] michael@0: SOURCES += [ michael@0: 'msvc_raise_wrappers.cpp', michael@0: 'msvc_throw_wrapper.cpp', michael@0: ] michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'mozalloc.cpp', michael@0: 'mozalloc_abort.cpp', michael@0: 'mozalloc_oom.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_TARGET'] == 'Android': michael@0: UNIFIED_SOURCES += [ michael@0: 'VolatileBufferAshmem.cpp', michael@0: ] michael@0: elif CONFIG['OS_TARGET'] == 'Darwin': michael@0: UNIFIED_SOURCES += [ michael@0: 'VolatileBufferOSX.cpp', michael@0: ] michael@0: elif CONFIG['OS_TARGET'] == 'WINNT': michael@0: UNIFIED_SOURCES += [ michael@0: 'VolatileBufferWindows.cpp', michael@0: ] michael@0: else: michael@0: UNIFIED_SOURCES += [ michael@0: 'VolatileBufferFallback.cpp', michael@0: ] michael@0: michael@0: LIBRARY_NAME = 'mozalloc' michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': michael@0: FORCE_STATIC_LIB = True michael@0: else: michael@0: FORCE_SHARED_LIB = True michael@0: michael@0: # The strndup declaration in string.h is in an ifdef __USE_GNU section michael@0: DEFINES['_GNU_SOURCE'] = True michael@0: michael@0: TEST_TOOL_DIRS += ['tests'] michael@0: michael@0: GENERATED_INCLUDES += ['/xpcom'] michael@0: michael@0: DISABLE_STL_WRAPPING = True