moz.build 959 B

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. 'mozmemory.h',
  7. 'mozmemory_wrap.h',
  8. ]
  9. LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
  10. DEFINES['MOZ_MEMORY_IMPL'] = True
  11. if CONFIG['MOZ_REPLACE_MALLOC']:
  12. EXPORTS += [
  13. 'malloc_decls.h',
  14. 'replace_malloc.h',
  15. 'replace_malloc_bridge.h',
  16. ]
  17. SOURCES += [
  18. 'jemalloc_config.cpp',
  19. 'mozmemory_wrap.c',
  20. ]
  21. if CONFIG['MOZ_REPLACE_MALLOC']:
  22. SOURCES += [
  23. 'replace_malloc.c',
  24. ]
  25. Library('memory')
  26. if CONFIG['MOZ_GLUE_IN_PROGRAM']:
  27. SDK_LIBRARY = True
  28. DIST_INSTALL = True
  29. # Keep jemalloc separated when mozglue is statically linked
  30. if CONFIG['MOZ_MEMORY'] and CONFIG['OS_TARGET'] in ('WINNT', 'Darwin'):
  31. FINAL_LIBRARY = 'mozglue'