Debian Codegraph @

memory/build/moz.build

raw
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/.
6
7 EXPORTS += [
8 "malloc_decls.h",
9 "mozjemalloc_types.h",
10 "mozmemory.h",
11 "mozmemory_utils.h",
12 "mozmemory_wrap.h",
13 "PHC.h",
14 ]
15
16 LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
17 DEFINES["MOZ_MEMORY_IMPL"] = True
18
19 if CONFIG["MOZ_BUILD_APP"] == "memory":
20 DEFINES["IMPL_MFBT"] = True
21
22 if CONFIG["MOZ_REPLACE_MALLOC"]:
23 EXPORTS += [
24 "replace_malloc.h",
25 "replace_malloc_bridge.h",
26 ]
27
28 if CONFIG["MOZ_PHC"]:
29 DEFINES["MOZ_PHC"] = True
30 UNIFIED_SOURCES += [
31 "FdPrintf.cpp",
32 # PHC.cpp is #included in mozjemalloc.cpp
33 ]
34
35 if CONFIG["MOZ_MEMORY"]:
36 UNIFIED_SOURCES += [
37 "mozjemalloc.cpp",
38 "mozmemory_wrap.cpp",
39 "Mutex.cpp",
40 ]
41 else:
42 UNIFIED_SOURCES += [
43 "fallback.cpp",
44 ]
45
46 if CONFIG["OS_TARGET"] == "Darwin" and (
47 CONFIG["MOZ_REPLACE_MALLOC"] or CONFIG["MOZ_MEMORY"]
48 ):
49 SOURCES += [
50 "zone.c",
51 ]
52
53 Library("memory")
54
55 if CONFIG["OS_TARGET"] == "Android" and CONFIG["CC_TYPE"] == "clang":
56 CXXFLAGS += [
57 "-Wno-tautological-pointer-compare",
58 ]
59
60 if CONFIG["MOZ_BUILD_APP"] != "memory":
61 FINAL_LIBRARY = "mozglue"
62
63 if CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
64 DEFINES["MOZ_REPLACE_MALLOC_STATIC"] = True
65
66 DisableStlWrapping()
67
68 if CONFIG["CC_TYPE"] == "clang-cl":
69 AllowCompilerWarnings() # workaround for bug 1090497
70
71 TEST_DIRS += ["test"]
72
73 if CONFIG["NIGHTLY_BUILD"]:
74 DEFINES["NON_RANDOM_ARENA_IDS"] = True