moz.build (2480B)
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 7 # Build mozglue as a shared lib on Windows, OSX and Android. But not for 8 # embedders! 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"]: 11 Library("mozglue") 12 elif CONFIG["OS_TARGET"] in ("WINNT", "Darwin", "Android"): 13 SharedLibrary("mozglue") 14 else: 15 Library("mozglue") 16 17 if CONFIG["OS_TARGET"] == "Android": 18 LDFLAGS += ["-Wl,--version-script,%s/mozglue.ver" % SRCDIR] 19 SOURCES += [ 20 "BionicGlue.cpp", 21 ] 22 23 if CONFIG["OS_TARGET"] == "WINNT": 24 if CONFIG["MOZ_MEMORY"]: 25 DEFFILE = "mozglue.def" 26 OS_LIBS += [ 27 "advapi32", 28 "user32", 29 "winmm", 30 "uuid", 31 ] 32 # We'll break the DLL blocklist if we immediately load user32.dll. 33 # For the same reason, we delayload these other DLLs to avoid eager 34 # dependencies on user32.dll. 35 DELAYLOAD_DLLS += [ 36 "advapi32.dll", 37 "dbghelp.dll", 38 "oleaut32.dll", 39 "ole32.dll", 40 "user32.dll", 41 "version.dll", 42 "winmm.dll", 43 ] 44 45 if CONFIG["MOZ_WIDGET_TOOLKIT"]: 46 if CONFIG["MOZ_MEMORY"] and FORCE_SHARED_LIB: 47 pass 48 # TODO: SHARED_LIBRARY_LIBS go here 49 else: 50 # Temporary, until bug 662814 lands 51 NoVisibilityFlags() 52 SOURCES += [ 53 "dummy.cpp", 54 ] 55 56 if CONFIG["OS_TARGET"] == "WINNT": 57 LOCAL_INCLUDES += [ 58 "/memory/build", 59 ] 60 61 EXPORTS.mozilla += [ 62 "arm.h", 63 "mips.h", 64 "ppc.h", 65 ] 66 67 if CONFIG["TARGET_CPU"] == "arm": 68 SOURCES += [ 69 "arm.cpp", 70 ] 71 72 if CONFIG["TARGET_CPU"].startswith("mips"): 73 SOURCES += [ 74 "mips.cpp", 75 ] 76 77 if CONFIG["TARGET_CPU"].startswith("ppc"): 78 SOURCES += [ 79 "ppc.cpp", 80 ] 81 82 if CONFIG["MOZ_LINKER"]: 83 USE_LIBS += [ 84 "zlib", 85 ] 86 87 LIBRARY_DEFINES["IMPL_MFBT"] = True 88 LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True 89 90 if CONFIG["MOZ_LINKER"] and CONFIG["TARGET_CPU"] == "arm": 91 LDFLAGS += ["-Wl,-version-script,%s/arm-eabi-filter" % SRCDIR] 92 93 DIST_INSTALL = True 94 95 include("replace_malloc.mozbuild")