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 # Build mozglue as a shared lib on Windows, OSX and Android. But not for
9 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
10 if CONFIG["JS_STANDALONE"] and not CONFIG["MOZ_MEMORY"]:
12 elif CONFIG["OS_TARGET"] in ("WINNT", "Darwin", "Android"):
13 SharedLibrary("mozglue")
17 if CONFIG["OS_TARGET"] == "Android":
18 LDFLAGS += ["-Wl,--version-script,%s/mozglue.ver" % SRCDIR]
23 if CONFIG["MOZ_ASAN"]:
28 if CONFIG["MOZ_UBSAN"]:
33 if CONFIG["MOZ_TSAN"]:
38 if CONFIG["OS_TARGET"] == "WINNT":
39 if CONFIG["MOZ_MEMORY"]:
40 DEFFILE = "mozglue.def"
47 # We'll break the DLL blocklist if we immediately load user32.dll.
48 # For the same reason, we delayload these other DLLs to avoid eager
49 # dependencies on user32.dll.
60 if CONFIG["MOZ_WIDGET_TOOLKIT"]:
61 if CONFIG["MOZ_MEMORY"] and FORCE_SHARED_LIB:
63 # TODO: SHARED_LIBRARY_LIBS go here
65 # Temporary, until bug 662814 lands
71 if CONFIG["OS_TARGET"] == "WINNT":
82 if CONFIG["TARGET_CPU"] == "arm":
87 if CONFIG["TARGET_CPU"].startswith("mips"):
92 if CONFIG["TARGET_CPU"].startswith("ppc"):
97 if CONFIG["MOZ_LINKER"]:
106 LIBRARY_DEFINES["IMPL_MFBT"] = True
107 LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True
109 if CONFIG["MOZ_LINKER"] and CONFIG["TARGET_CPU"] == "arm":
110 LDFLAGS += ["-Wl,-version-script,%s/arm-eabi-filter" % SRCDIR]
114 include("replace_malloc.mozbuild")