no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / memory / build / moz.build
blobda679773308be323a5ca31f3eba78e316cd41dc1
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 EXPORTS += [
8     "malloc_decls.h",
9     "mozjemalloc_types.h",
10     "mozmemory.h",
11     "mozmemory_utils.h",
12     "mozmemory_wrap.h",
13     "PHC.h",
16 LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
17 DEFINES["MOZ_MEMORY_IMPL"] = True
19 if CONFIG["MOZ_REPLACE_MALLOC"]:
20     EXPORTS += [
21         "replace_malloc.h",
22         "replace_malloc_bridge.h",
23     ]
25 if CONFIG["MOZ_PHC"]:
26     DEFINES["MOZ_PHC"] = True
27     UNIFIED_SOURCES += [
28         "FdPrintf.cpp",
29         # PHC.cpp is #included in mozjemalloc.cpp
30     ]
32 if CONFIG["MOZ_MEMORY"]:
33     UNIFIED_SOURCES += [
34         "mozjemalloc.cpp",
35         "mozmemory_wrap.cpp",
36         "Mutex.cpp",
37     ]
38 else:
39     UNIFIED_SOURCES += [
40         "fallback.cpp",
41     ]
43 if CONFIG["OS_TARGET"] == "Darwin" and (
44     CONFIG["MOZ_REPLACE_MALLOC"] or CONFIG["MOZ_MEMORY"]
46     SOURCES += [
47         "zone.c",
48     ]
50 Library("memory")
52 if CONFIG["OS_TARGET"] == "Android" and CONFIG["CC_TYPE"] == "clang":
53     CXXFLAGS += [
54         "-Wno-tautological-pointer-compare",
55     ]
57 if CONFIG["MOZ_BUILD_APP"] != "memory":
58     FINAL_LIBRARY = "mozglue"
60 if CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
61     DEFINES["MOZ_REPLACE_MALLOC_STATIC"] = True
63 DisableStlWrapping()
65 if CONFIG["CC_TYPE"] == "clang-cl":
66     AllowCompilerWarnings()  # workaround for bug 1090497
68 TEST_DIRS += ["test"]