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/.
|
|
|
|
|
2018-01-16 00:57:03 +03:00
|
|
|
# Build mozglue as a shared lib on Windows, OSX and Android. But not for
|
|
|
|
# embedders!
|
2013-04-24 01:54:15 +04:00
|
|
|
# If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
|
2018-01-16 00:57:03 +03:00
|
|
|
if CONFIG["JS_STANDALONE"] and not CONFIG["MOZ_MEMORY"]:
|
|
|
|
Library("mozglue")
|
|
|
|
elif CONFIG["OS_TARGET"] in ("WINNT", "Darwin", "Android"):
|
2014-09-04 04:04:45 +04:00
|
|
|
SharedLibrary("mozglue")
|
2013-04-24 01:54:15 +04:00
|
|
|
else:
|
2014-09-04 04:04:45 +04:00
|
|
|
Library("mozglue")
|
2013-04-24 01:54:15 +04:00
|
|
|
|
|
|
|
if CONFIG["OS_TARGET"] == "Android":
|
2019-04-19 00:39:10 +03:00
|
|
|
LDFLAGS += ["-Wl,--version-script,%s/mozglue.ver" % SRCDIR]
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
"BionicGlue.cpp",
|
|
|
|
]
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2015-03-19 12:12:53 +03:00
|
|
|
if CONFIG["MOZ_ASAN"]:
|
2013-11-12 17:31:32 +04:00
|
|
|
SOURCES += [
|
2015-03-19 12:12:53 +03:00
|
|
|
"AsanOptions.cpp",
|
2013-11-12 17:31:32 +04:00
|
|
|
]
|
2015-03-19 12:12:53 +03:00
|
|
|
|
2018-09-11 05:47:23 +03:00
|
|
|
if CONFIG["MOZ_UBSAN"]:
|
|
|
|
SOURCES += [
|
|
|
|
"UbsanOptions.cpp",
|
|
|
|
]
|
|
|
|
|
2019-10-16 19:09:21 +03:00
|
|
|
if CONFIG["MOZ_TSAN"]:
|
|
|
|
SOURCES += [
|
|
|
|
"TsanOptions.cpp",
|
|
|
|
]
|
|
|
|
|
2015-03-19 12:12:53 +03:00
|
|
|
if CONFIG["OS_TARGET"] == "WINNT":
|
2020-07-10 18:27:10 +03:00
|
|
|
if CONFIG["MOZ_MEMORY"]:
|
|
|
|
DEFFILE = "mozglue.def"
|
2019-09-04 02:27:46 +03:00
|
|
|
# We'll break the DLL blocklist if we immediately load user32.dll.
|
2021-07-08 01:37:14 +03:00
|
|
|
# For the same reason, we delayload winmm.dll and ole32.dll which
|
|
|
|
# statically link user32.dll.
|
2015-08-15 01:27:03 +03:00
|
|
|
DELAYLOAD_DLLS += [
|
2021-07-08 01:37:14 +03:00
|
|
|
"ole32.dll",
|
2015-08-15 01:27:03 +03:00
|
|
|
"user32.dll",
|
2019-09-04 02:27:46 +03:00
|
|
|
"winmm.dll",
|
2015-08-15 01:27:03 +03:00
|
|
|
]
|
2013-11-12 17:31:32 +04:00
|
|
|
|
2017-10-05 08:50:01 +03:00
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"]:
|
2015-03-19 12:12:53 +03:00
|
|
|
|
2017-05-11 07:03:20 +03:00
|
|
|
if CONFIG["MOZ_MEMORY"] and FORCE_SHARED_LIB:
|
2015-03-19 12:12:53 +03:00
|
|
|
pass
|
|
|
|
# TODO: SHARED_LIBRARY_LIBS go here
|
|
|
|
else:
|
|
|
|
# Temporary, until bug 662814 lands
|
2017-05-02 04:12:35 +03:00
|
|
|
NoVisibilityFlags()
|
2015-03-19 12:12:53 +03:00
|
|
|
SOURCES += [
|
|
|
|
"dummy.cpp",
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG["OS_TARGET"] == "WINNT":
|
2016-03-29 22:59:14 +03:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
"/memory/build",
|
|
|
|
]
|
2018-01-25 21:15:40 +03:00
|
|
|
|
2015-03-19 12:12:53 +03:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
"arm.h",
|
2016-04-13 16:40:28 +03:00
|
|
|
"mips.h",
|
2019-08-21 06:36:55 +03:00
|
|
|
"ppc.h",
|
2015-03-19 12:12:53 +03:00
|
|
|
"SSE.h",
|
2013-10-30 02:51:03 +04:00
|
|
|
]
|
2013-05-07 10:25:13 +04:00
|
|
|
|
2015-03-19 12:12:53 +03:00
|
|
|
if CONFIG["CPU_ARCH"].startswith("x86"):
|
|
|
|
SOURCES += [
|
|
|
|
"SSE.cpp",
|
|
|
|
]
|
2013-07-26 20:46:31 +04:00
|
|
|
|
2015-03-19 12:12:53 +03:00
|
|
|
if CONFIG["CPU_ARCH"] == "arm":
|
|
|
|
SOURCES += [
|
|
|
|
"arm.cpp",
|
|
|
|
]
|
2013-07-26 20:46:31 +04:00
|
|
|
|
2016-04-13 16:40:28 +03:00
|
|
|
if CONFIG["CPU_ARCH"].startswith("mips"):
|
|
|
|
SOURCES += [
|
|
|
|
"mips.cpp",
|
|
|
|
]
|
|
|
|
|
2019-08-21 06:36:55 +03:00
|
|
|
if CONFIG["CPU_ARCH"].startswith("ppc"):
|
|
|
|
SOURCES += [
|
|
|
|
"ppc.cpp",
|
|
|
|
]
|
|
|
|
|
2015-03-19 12:12:53 +03:00
|
|
|
if CONFIG["MOZ_LINKER"]:
|
|
|
|
USE_LIBS += [
|
|
|
|
"zlib",
|
|
|
|
]
|
2013-07-26 20:46:31 +04:00
|
|
|
|
2014-07-23 08:30:52 +04:00
|
|
|
USE_LIBS += [
|
|
|
|
"mfbt",
|
|
|
|
]
|
|
|
|
|
2021-07-08 01:37:14 +03:00
|
|
|
if CONFIG["OS_ARCH"] == "WINNT":
|
|
|
|
RCINCLUDE = "/mozglue/mozglue.rc"
|
|
|
|
|
|
|
|
if not CONFIG["HAVE_64BIT_BUILD"]:
|
|
|
|
EXPORTS += [
|
|
|
|
"IAccessible32.manifest",
|
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS += [
|
|
|
|
"IAccessible64.manifest",
|
|
|
|
]
|
|
|
|
|
2019-05-30 01:49:42 +03:00
|
|
|
LIBRARY_DEFINES["IMPL_MFBT"] = True
|
2016-11-08 11:53:00 +03:00
|
|
|
LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
|
2014-10-30 07:06:12 +03:00
|
|
|
|
2015-03-04 15:11:32 +03:00
|
|
|
if CONFIG["OS_TARGET"] == "Darwin":
|
|
|
|
# On OSX 10.10.3, a dead lock happens in some cases involving dynamic
|
|
|
|
# symbol resolution for symbols that jemalloc itself uses. While it
|
|
|
|
# might be possible to find a way to avoid all such symbol resolutions,
|
|
|
|
# it's currently not possible because at the very least there's a call
|
|
|
|
# to pthread_self from tsd_init_check_recursion, which is necessary
|
|
|
|
# because somehow clang doesn't want to accept the __thread keyword
|
|
|
|
# for TLS.
|
|
|
|
LDFLAGS += ["-Wl,-bind_at_load"]
|
2015-05-09 02:37:22 +03:00
|
|
|
|
2018-07-24 23:08:55 +03:00
|
|
|
if CONFIG["MOZ_LINKER"] and CONFIG["CPU_ARCH"] == "arm":
|
2017-11-02 21:47:48 +03:00
|
|
|
LDFLAGS += ["-Wl,-version-script,%s/arm-eabi-filter" % SRCDIR]
|
|
|
|
|
2015-05-09 02:37:22 +03:00
|
|
|
DIST_INSTALL = True
|
2020-08-11 03:05:38 +03:00
|
|
|
|
|
|
|
include("replace_malloc.mozbuild")
|