Bug 1845715 - Check for failure when getting RegExp match result template r=iain
[gecko.git] / memory / build / moz.build
blobafa10ce4b29265870c45d61b5be27d82b5c2cf07
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",
15 LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
16 DEFINES["MOZ_MEMORY_IMPL"] = True
18 if CONFIG["MOZ_REPLACE_MALLOC"]:
19     EXPORTS += [
20         "replace_malloc.h",
21         "replace_malloc_bridge.h",
22     ]
24 if CONFIG["MOZ_PHC"]:
25     DEFINES["MOZ_PHC"] = True
27 if CONFIG["MOZ_MEMORY"]:
28     UNIFIED_SOURCES += [
29         "mozjemalloc.cpp",
30         "mozmemory_wrap.cpp",
31         "Mutex.cpp",
32     ]
33 else:
34     UNIFIED_SOURCES += [
35         "fallback.cpp",
36     ]
38 if CONFIG["OS_TARGET"] == "Darwin" and (
39     CONFIG["MOZ_REPLACE_MALLOC"] or CONFIG["MOZ_MEMORY"]
41     SOURCES += [
42         "zone.c",
43     ]
45 Library("memory")
47 if CONFIG["OS_TARGET"] == "Android" and CONFIG["CC_TYPE"] == "clang":
48     CXXFLAGS += [
49         "-Wno-tautological-pointer-compare",
50     ]
52 if CONFIG["MOZ_BUILD_APP"] != "memory":
53     FINAL_LIBRARY = "mozglue"
55 if CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
56     DEFINES["MOZ_REPLACE_MALLOC_STATIC"] = True
58 DisableStlWrapping()
60 if CONFIG["CC_TYPE"] == "clang-cl":
61     AllowCompilerWarnings()  # workaround for bug 1090497
63 TEST_DIRS += ["test"]