moz.build 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. NO_VISIBILITY_FLAGS = True
  6. EXPORTS.mozilla += [
  7. 'mozalloc.h',
  8. 'mozalloc_abort.h',
  9. 'mozalloc_oom.h',
  10. ]
  11. if CONFIG['WRAP_STL_INCLUDES']:
  12. if CONFIG['GNU_CXX']:
  13. EXPORTS.mozilla += ['throw_gcc.h']
  14. elif CONFIG['_MSC_VER']:
  15. DEFINES['_HAS_EXCEPTIONS'] = 0
  16. if CONFIG['MOZ_MSVC_STL_WRAP_RAISE']:
  17. EXPORTS.mozilla += [
  18. 'msvc_raise_wrappers.h',
  19. 'throw_msvc.h',
  20. ]
  21. SOURCES += [
  22. 'msvc_raise_wrappers.cpp',
  23. ]
  24. if CONFIG['OS_TARGET'] == 'WINNT':
  25. # Keep this file separate to avoid #include'ing windows.h everywhere.
  26. SOURCES += [
  27. 'winheap.cpp',
  28. ]
  29. UNIFIED_SOURCES += [
  30. 'mozalloc.cpp',
  31. 'mozalloc_abort.cpp',
  32. 'mozalloc_oom.cpp',
  33. ]
  34. FINAL_LIBRARY = 'mozglue'
  35. # The strndup declaration in string.h is in an ifdef __USE_GNU section
  36. DEFINES['_GNU_SOURCE'] = True
  37. DISABLE_STL_WRAPPING = True
  38. DEFINES['IMPL_MFBT'] = True
  39. if CONFIG['_MSC_VER']:
  40. DIRS += ['staticruntime']
  41. LOCAL_INCLUDES += [
  42. '!/xpcom',
  43. '/memory/build',
  44. ]
  45. DIST_INSTALL = True