2013-04-01 18:36:59 +00:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:17 +00: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-23 21:54:15 +00: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 00:04:45 +00:00
|
|
|
SharedLibrary('mozglue')
|
2013-04-23 21:54:15 +00:00
|
|
|
else:
|
2014-09-04 00:04:45 +00:00
|
|
|
Library('mozglue')
|
2013-04-23 21:54:15 +00:00
|
|
|
|
2015-05-26 06:48:21 +00:00
|
|
|
if not CONFIG['MOZ_CRT']:
|
|
|
|
SDK_LIBRARY = True
|
2014-07-23 04:29:09 +00:00
|
|
|
|
2013-04-23 21:54:15 +00:00
|
|
|
if CONFIG['OS_TARGET'] == 'Android':
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'BionicGlue.cpp',
|
|
|
|
]
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2015-03-19 09:12:53 +00:00
|
|
|
if CONFIG['MOZ_ASAN']:
|
2013-11-12 13:31:32 +00:00
|
|
|
SOURCES += [
|
2015-03-19 09:12:53 +00:00
|
|
|
'AsanOptions.cpp',
|
2013-11-12 13:31:32 +00:00
|
|
|
]
|
2015-03-19 09:12:53 +00:00
|
|
|
|
|
|
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
2014-02-11 16:28:54 +00:00
|
|
|
DEFFILE = 'mozglue.def'
|
2015-08-14 22:27:03 +00:00
|
|
|
# We'll break the DLL blocklist if we immediately load user32.dll
|
|
|
|
DELAYLOAD_DLLS += [
|
|
|
|
'user32.dll',
|
|
|
|
]
|
2013-11-12 13:31:32 +00:00
|
|
|
|
2015-03-19 09:12:53 +00:00
|
|
|
if not CONFIG['JS_STANDALONE']:
|
|
|
|
|
|
|
|
if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_NATIVE_JEMALLOC'] or FORCE_SHARED_LIB):
|
|
|
|
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':
|
|
|
|
SOURCES += [
|
|
|
|
'WindowsDllBlocklist.cpp',
|
|
|
|
]
|
|
|
|
DISABLE_STL_WRAPPING = True
|
|
|
|
OS_LIBS += [
|
|
|
|
'version',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_NUWA_PROCESS']:
|
|
|
|
EXPORTS.ipc += [
|
|
|
|
'Nuwa.h',
|
|
|
|
]
|
|
|
|
SOURCES += [
|
|
|
|
'Nuwa.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'arm.h',
|
|
|
|
'SSE.h',
|
|
|
|
'WindowsDllBlocklist.h',
|
2013-10-29 22:51:03 +00:00
|
|
|
]
|
2013-05-07 06:25:13 +00:00
|
|
|
|
2015-03-19 09:12:53 +00:00
|
|
|
if CONFIG['CPU_ARCH'].startswith('x86'):
|
|
|
|
SOURCES += [
|
|
|
|
'SSE.cpp',
|
|
|
|
]
|
2013-07-26 16:46:31 +00:00
|
|
|
|
2015-03-19 09:12:53 +00:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm':
|
|
|
|
SOURCES += [
|
|
|
|
'arm.cpp',
|
|
|
|
]
|
2013-07-26 16:46:31 +00:00
|
|
|
|
2015-03-19 09:12:53 +00:00
|
|
|
if CONFIG['MOZ_LINKER']:
|
|
|
|
USE_LIBS += [
|
|
|
|
'zlib',
|
|
|
|
]
|
2013-07-26 16:46:31 +00:00
|
|
|
|
2015-03-19 09:12:53 +00:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
SOURCES += [
|
|
|
|
'cpuacct.c',
|
|
|
|
]
|
2013-07-26 16:46:31 +00:00
|
|
|
|
2014-07-23 04:30:52 +00:00
|
|
|
USE_LIBS += [
|
|
|
|
'mfbt',
|
|
|
|
]
|
|
|
|
|
2013-11-27 13:55:07 +00:00
|
|
|
DEFINES['IMPL_MFBT'] = True
|
2014-10-30 04:06:12 +00:00
|
|
|
|
|
|
|
LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
|
2014-12-11 06:46:01 +00:00
|
|
|
|
2015-03-04 12:11:32 +00: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-08 23:37:22 +00:00
|
|
|
|
|
|
|
DIST_INSTALL = True
|
2015-09-23 04:39:03 +00:00
|
|
|
|
|
|
|
if CONFIG['GNU_CXX']:
|
|
|
|
CXXFLAGS += ['-Wshadow']
|