2013-04-01 22:36:59 +04:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:22 +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/.
|
|
|
|
|
2015-05-15 00:20:57 +03:00
|
|
|
# Any changes that affect Android need to be made in pie/moz.build as well.
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2014-10-30 07:06:12 +03:00
|
|
|
Program(CONFIG['MOZ_CHILD_PROCESS_NAME'])
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'MozillaRuntimeMainAndroid.cpp',
|
|
|
|
]
|
2015-05-15 00:20:57 +03:00
|
|
|
|
|
|
|
DIRS += ['pie']
|
2013-04-24 01:54:15 +04:00
|
|
|
else:
|
2014-10-30 07:06:12 +03:00
|
|
|
kwargs = {
|
|
|
|
'linkage': None,
|
|
|
|
}
|
2015-09-10 23:55:15 +03:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['MOZ_ASAN']:
|
2014-10-30 07:06:12 +03:00
|
|
|
kwargs['msvcrt'] = 'static'
|
2015-02-27 08:00:15 +03:00
|
|
|
if not CONFIG['GNU_CC']:
|
|
|
|
USE_LIBS += [
|
|
|
|
'mozalloc_staticruntime',
|
|
|
|
]
|
2014-10-30 07:06:12 +03:00
|
|
|
GeckoProgram(CONFIG['MOZ_CHILD_PROCESS_NAME'], **kwargs)
|
|
|
|
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'MozillaRuntimeMain.cpp',
|
|
|
|
]
|
2014-07-23 08:30:52 +04:00
|
|
|
USE_LIBS += [
|
2014-08-07 09:21:03 +04:00
|
|
|
'nspr',
|
2014-07-23 08:33:09 +04:00
|
|
|
'xul',
|
2014-07-23 08:30:52 +04:00
|
|
|
]
|
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2014-02-10 22:41:02 +04:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/toolkit/xre',
|
|
|
|
'/xpcom/base',
|
|
|
|
]
|
2014-02-14 20:07:24 +04:00
|
|
|
|
2014-11-14 11:26:24 +03:00
|
|
|
# We link GMPLoader into plugin-container on desktop so that its code is
|
|
|
|
# covered by the desktop DRM vendor's voucher.
|
|
|
|
if CONFIG['OS_TARGET'] != 'Android':
|
|
|
|
SOURCES += [
|
|
|
|
'../../dom/media/gmp/GMPLoader.cpp',
|
|
|
|
]
|
|
|
|
|
2014-08-27 18:32:55 +04:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
|
2014-02-14 20:07:24 +04:00
|
|
|
# For sandbox includes and the include dependencies those have
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/security/sandbox/chromium',
|
2015-04-01 11:40:35 +03:00
|
|
|
'/security/sandbox/chromium-shim',
|
2014-02-14 20:07:24 +04:00
|
|
|
]
|
2014-07-23 08:30:52 +04:00
|
|
|
USE_LIBS += [
|
2014-11-14 11:26:24 +03:00
|
|
|
'rlz',
|
2014-07-23 08:30:52 +04:00
|
|
|
]
|
2015-09-08 22:07:45 +03:00
|
|
|
|
2015-09-10 23:55:15 +03:00
|
|
|
if CONFIG['MOZ_ASAN']:
|
|
|
|
USE_LIBS += [
|
|
|
|
'sandbox_s',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
USE_LIBS += [
|
|
|
|
'sandbox_staticruntime_s',
|
|
|
|
]
|
|
|
|
|
2016-02-22 17:55:58 +03:00
|
|
|
DELAYLOAD_DLLS += [
|
|
|
|
'nss3.dll',
|
|
|
|
'xul.dll'
|
|
|
|
]
|
2015-09-08 22:07:45 +03:00
|
|
|
|
2014-11-14 11:39:18 +03:00
|
|
|
DEFINES['HASH_NODE_ID_WITH_DEVICE_ID'] = 1;
|
2014-11-14 11:26:24 +03:00
|
|
|
SOURCES += [
|
|
|
|
'sha256.c',
|
|
|
|
]
|
|
|
|
|
2015-04-11 04:05:19 +03:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] in ('Linux', 'Android'):
|
2014-11-25 02:22:13 +03:00
|
|
|
USE_LIBS += [
|
|
|
|
'mozsandbox',
|
|
|
|
]
|
|
|
|
|
2015-01-20 01:21:56 +03:00
|
|
|
# gcc lto likes to put the top level asm in syscall.cc in a different partition
|
|
|
|
# from the function using it which breaks the build. Work around that by
|
|
|
|
# forcing there to be only one partition.
|
|
|
|
if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']:
|
2015-05-04 15:20:33 +03:00
|
|
|
LDFLAGS += ['--param lto-partitions=1']
|
2015-01-20 01:21:56 +03:00
|
|
|
|
2015-04-03 19:51:41 +03:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] == 'Darwin':
|
2015-10-29 18:27:00 +03:00
|
|
|
# For sandbox includes and the include dependencies those have
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/security/sandbox/chromium',
|
|
|
|
'/security/sandbox/chromium-shim',
|
|
|
|
]
|
2015-04-03 19:51:41 +03:00
|
|
|
USE_LIBS += [
|
|
|
|
'mozsandbox',
|
2015-10-29 18:27:00 +03:00
|
|
|
'rlz',
|
|
|
|
]
|
|
|
|
|
|
|
|
DEFINES['HASH_NODE_ID_WITH_DEVICE_ID'] = 1;
|
|
|
|
SOURCES += [
|
|
|
|
'sha256.c',
|
2015-04-03 19:51:41 +03:00
|
|
|
]
|
|
|
|
|
2014-02-24 17:30:25 +04:00
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
# Always enter a Windows program through wmain, whether or not we're
|
|
|
|
# a console application.
|
|
|
|
WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
|
2014-02-27 06:38:29 +04:00
|
|
|
|
2015-11-20 11:00:33 +03:00
|
|
|
LDFLAGS += CONFIG['MOZ_ALLOW_HEAP_EXECUTE_FLAGS']
|
2014-02-27 06:42:21 +04:00
|
|
|
|
2014-02-27 06:38:29 +04:00
|
|
|
# Control the default heap size.
|
|
|
|
# This is the heap returned by GetProcessHeap().
|
|
|
|
# As we use the CRT heap, the default size is too large and wastes VM.
|
|
|
|
#
|
|
|
|
# The default heap size is 1MB on Win32.
|
|
|
|
# The heap will grow if need be.
|
|
|
|
#
|
|
|
|
# Set it to 256k. See bug 127069.
|
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
|
|
|
|
LDFLAGS += ['/HEAP:0x40000']
|
2014-05-08 10:55:30 +04:00
|
|
|
|
2014-08-06 02:25:33 +04:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
OS_LIBS += [
|
|
|
|
'binder',
|
|
|
|
'utils',
|
|
|
|
]
|
2015-09-23 07:39:03 +03:00
|
|
|
|
|
|
|
if CONFIG['GNU_CXX']:
|
|
|
|
CXXFLAGS += ['-Wshadow']
|