Debian Codegraph @

memory/mozalloc/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 NoVisibilityFlags()
7
8 EXPORTS.mozilla += [
9 "cxxalloc.h",
10 "mozalloc.h",
11 "mozalloc_abort.h",
12 "mozalloc_oom.h",
13 ]
14
15 if CONFIG["WRAP_STL_INCLUDES"]:
16 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
17 EXPORTS.mozilla += ["throw_gcc.h"]
18 elif CONFIG["CC_TYPE"] == "clang-cl":
19 DEFINES["_HAS_EXCEPTIONS"] = 0
20 SOURCES += [
21 "msvc_raise_wrappers.cpp",
22 ]
23
24 UNIFIED_SOURCES += [
25 "mozalloc.cpp",
26 "mozalloc_abort.cpp",
27 "mozalloc_oom.cpp",
28 ]
29
30 if CONFIG["MOZ_MEMORY"]:
31 # In MinGW, we don't want to actually export these functions out of the library
32 # as the functions in libc++ correctly forward to jemalloc and exporting them
33 # produces duplicate symbol errors.
34 if not (CONFIG["CC_TYPE"] == "clang" and CONFIG["OS_TARGET"] == "WINNT"):
35 SOURCES += [
36 "cxxalloc.cpp",
37 ]
38
39 FINAL_LIBRARY = "mozglue"
40
41 # The strndup declaration in string.h is in an ifdef __USE_GNU section
42 DEFINES["_GNU_SOURCE"] = True
43
44 DisableStlWrapping()
45
46 LOCAL_INCLUDES += [
47 "!/xpcom",
48 "/memory/build",
49 ]
50
51 DIST_INSTALL = True