2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:17 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
2017-09-14 12:28:12 +03:00
|
|
|
"malloc_decls.h",
|
2017-08-31 10:43:19 +03:00
|
|
|
"mozjemalloc_types.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"mozmemory.h",
|
|
|
|
"mozmemory_wrap.h",
|
|
|
|
]
|
|
|
|
|
2016-11-10 14:57:00 +03:00
|
|
|
LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES["MOZ_MEMORY_IMPL"] = True
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
if CONFIG["MOZ_REPLACE_MALLOC"]:
|
|
|
|
EXPORTS += [
|
2013-05-17 05:07:12 +04:00
|
|
|
"replace_malloc.h",
|
2014-11-18 13:21:06 +03:00
|
|
|
"replace_malloc_bridge.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2019-07-03 02:26:11 +03:00
|
|
|
if CONFIG["MOZ_PHC"]:
|
|
|
|
DEFINES["MOZ_PHC"] = True
|
|
|
|
|
2017-09-22 01:22:38 +03:00
|
|
|
if CONFIG["MOZ_MEMORY"]:
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"mozjemalloc.cpp",
|
|
|
|
"mozmemory_wrap.cpp",
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"fallback.cpp",
|
|
|
|
]
|
2013-06-04 19:08:44 +04:00
|
|
|
|
2017-01-18 05:45:45 +03:00
|
|
|
if CONFIG["OS_TARGET"] == "Darwin" and (
|
|
|
|
CONFIG["MOZ_REPLACE_MALLOC"] or CONFIG["MOZ_MEMORY"]
|
|
|
|
):
|
|
|
|
SOURCES += [
|
|
|
|
"zone.c",
|
|
|
|
]
|
2017-01-18 05:39:29 +03:00
|
|
|
|
2014-09-03 09:10:54 +04:00
|
|
|
Library("memory")
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2017-09-07 15:20:12 +03:00
|
|
|
if CONFIG["OS_TARGET"] == "Android" and CONFIG["CC_TYPE"] == "clang":
|
2017-10-27 23:07:47 +03:00
|
|
|
CXXFLAGS += [
|
2017-09-07 15:20:12 +03:00
|
|
|
"-Wno-tautological-pointer-compare",
|
|
|
|
]
|
|
|
|
|
2017-11-15 08:21:15 +03:00
|
|
|
if CONFIG["MOZ_BUILD_APP"] != "memory":
|
|
|
|
FINAL_LIBRARY = "mozglue"
|
2017-08-31 10:43:19 +03:00
|
|
|
|
2017-11-23 11:24:19 +03:00
|
|
|
if CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
|
|
|
|
DEFINES["MOZ_REPLACE_MALLOC_STATIC"] = True
|
|
|
|
|
2017-08-31 10:43:19 +03:00
|
|
|
DisableStlWrapping()
|
2018-07-31 16:10:07 +03:00
|
|
|
|
|
|
|
if CONFIG["CC_TYPE"] == "clang-cl":
|
|
|
|
AllowCompilerWarnings() # workaround for bug 1090497
|