moz.build 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. EXPORTS += [
  6. 'jemalloc_types.h',
  7. ]
  8. SOURCES += [
  9. 'jemalloc.c',
  10. ]
  11. FINAL_LIBRARY = 'memory'
  12. # For non release/esr builds, enable (some) fatal jemalloc assertions. This
  13. # helps us catch memory errors.
  14. if CONFIG['MOZ_UPDATE_CHANNEL'] not in ('release', 'esr'):
  15. DEFINES['MOZ_JEMALLOC_HARD_ASSERTS'] = True
  16. DEFINES['abort'] = 'moz_abort'
  17. DEFINES['MOZ_JEMALLOC_IMPL'] = True
  18. #XXX: PGO on Linux causes problems here
  19. # See bug 419470
  20. if CONFIG['OS_TARGET'] == 'Linux':
  21. NO_PGO = True
  22. LOCAL_INCLUDES += [
  23. '/memory/build',
  24. ]
  25. if CONFIG['GNU_CC']:
  26. # too many annoying warnings from mfbt/ headers
  27. # also too many false positives from functions generated through rb_wrab from rb.h.
  28. CFLAGS += ['-Wno-unused',
  29. '-Wno-uninitialized']
  30. if CONFIG['_MSC_VER']:
  31. CFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)