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-24 01:54:15 +04:00
|
|
|
# Build mozglue as a shared lib on Windows, OSX and Android.
|
|
|
|
# If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
|
|
|
|
if 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':
|
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
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
2014-02-11 20:28:54 +04:00
|
|
|
DEFFILE = 'mozglue.def'
|
2015-08-15 01:27:03 +03:00
|
|
|
# We'll break the DLL blocklist if we immediately load user32.dll
|
|
|
|
DELAYLOAD_DLLS += [
|
|
|
|
'user32.dll',
|
|
|
|
]
|
2013-11-12 17:31:32 +04:00
|
|
|
|
2015-03-19 12:12:53 +03:00
|
|
|
if not CONFIG['JS_STANDALONE']:
|
|
|
|
|
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
|
|
|
|
NO_VISIBILITY_FLAGS = True
|
|
|
|
SOURCES += [
|
|
|
|
'dummy.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
2016-03-29 22:59:14 +03:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/memory/build',
|
|
|
|
]
|
2015-03-19 12:12:53 +03:00
|
|
|
SOURCES += [
|
|
|
|
'WindowsDllBlocklist.cpp',
|
|
|
|
]
|
|
|
|
DISABLE_STL_WRAPPING = True
|
|
|
|
OS_LIBS += [
|
|
|
|
'version',
|
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'arm.h',
|
2016-04-13 16:40:28 +03:00
|
|
|
'mips.h',
|
2015-03-19 12:12:53 +03:00
|
|
|
'SSE.h',
|
|
|
|
'WindowsDllBlocklist.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',
|
|
|
|
]
|
|
|
|
|
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',
|
|
|
|
]
|
|
|
|
|
2013-11-27 17:55:07 +04:00
|
|
|
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
|
|
|
|
|
|
|
LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
|
2014-12-11 09:46:01 +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
|
|
|
|
|
|
|
DIST_INSTALL = True
|