2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:18 +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-02-26 22:43:45 +03:00
|
|
|
with Files('**'):
|
2018-03-14 23:44:46 +03:00
|
|
|
BUG_COMPONENT = ('Firefox Build System', 'General')
|
2015-02-26 22:43:45 +03:00
|
|
|
|
2013-12-18 23:15:45 +04:00
|
|
|
# This cannot be named "build" because of bug 922191.
|
|
|
|
SPHINX_TREES['buildsystem'] = 'docs'
|
2013-11-21 00:37:22 +04:00
|
|
|
|
2017-10-02 21:22:56 +03:00
|
|
|
with Files('docs/**'):
|
|
|
|
SCHEDULES.exclusive = ['docs']
|
|
|
|
|
2014-02-11 02:57:01 +04:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
2013-02-26 00:47:18 +04:00
|
|
|
DIRS += ['win32']
|
2014-02-11 02:57:01 +04:00
|
|
|
else:
|
|
|
|
DIRS += ['unix']
|
2013-02-26 00:47:18 +04:00
|
|
|
|
2017-10-25 03:10:55 +03:00
|
|
|
CRAMTEST_MANIFESTS += [
|
|
|
|
'tests/cram/cram.ini',
|
|
|
|
]
|
|
|
|
|
2016-11-02 11:16:56 +03:00
|
|
|
DEFINES['ACCEPTED_MAR_CHANNEL_IDS'] = CONFIG['ACCEPTED_MAR_CHANNEL_IDS']
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2014-07-28 19:51:12 +04:00
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
2016-11-16 17:59:22 +03:00
|
|
|
PYTHON_UNITTEST_MANIFESTS += [
|
|
|
|
'compare-mozconfig/python.ini',
|
2014-07-28 19:51:12 +04:00
|
|
|
]
|
2015-02-20 21:26:59 +03:00
|
|
|
|
|
|
|
if CONFIG['ENABLE_TESTS'] or CONFIG['MOZ_DMD']:
|
2020-04-08 09:55:54 +03:00
|
|
|
FINAL_TARGET_FILES += ['/tools/rb/fix_stacks.py']
|
2015-02-20 21:26:59 +03:00
|
|
|
|
|
|
|
if CONFIG['MOZ_DMD']:
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['/memory/replace/dmd/dmd.py']
|
2015-02-23 16:27:45 +03:00
|
|
|
|
2020-06-16 18:45:43 +03:00
|
|
|
# Put a useful .gdbinit and .gdbinit.py in $objdir/build, to be picked up
|
|
|
|
# automatically by GDB via either libxul.so-gdb.py or js-gdb.py.
|
|
|
|
OBJDIR_PP_FILES.build += ['.gdbinit.py.in']
|
|
|
|
OBJDIR_FILES.build += ['.gdbinit.loader']
|
|
|
|
OBJDIR_FILES.build += ['.gdbinit']
|
2015-02-23 16:29:12 +03:00
|
|
|
|
|
|
|
# Install the clang-cl runtime library for ASAN next to the binaries we produce.
|
2017-12-08 00:09:38 +03:00
|
|
|
if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl':
|
2015-12-01 12:45:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
|
2018-07-26 12:16:50 +03:00
|
|
|
FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH'].replace(".dll", ".pdb")]
|
2015-04-15 23:04:49 +03:00
|
|
|
|
2019-12-05 00:44:06 +03:00
|
|
|
# Install the clang runtime library for ASAN next to the binaries we produce.
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android' and CONFIG['MOZ_ASAN']:
|
|
|
|
FINAL_TARGET_FILES += ['%' + CONFIG['MOZ_CLANG_RT_ASAN_LIB_PATH']]
|
|
|
|
|
2017-03-10 07:24:02 +03:00
|
|
|
if CONFIG['LLVM_SYMBOLIZER']:
|
|
|
|
FINAL_TARGET_FILES += ['/' + CONFIG['LLVM_SYMBOLIZER']]
|
|
|
|
|
2015-04-15 23:04:49 +03:00
|
|
|
if CONFIG['MOZ_APP_BASENAME']:
|
2016-11-02 11:16:56 +03:00
|
|
|
appini_defines = {
|
|
|
|
'TOPOBJDIR': TOPOBJDIR,
|
|
|
|
}
|
|
|
|
|
|
|
|
for var in ('GRE_MILESTONE', 'MOZ_APP_VERSION', 'MOZ_APP_BASENAME',
|
|
|
|
'MOZ_APP_VENDOR', 'MOZ_APP_ID', 'MAR_CHANNEL_ID',
|
|
|
|
'MOZ_APP_REMOTINGNAME'):
|
|
|
|
appini_defines[var] = CONFIG[var]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_APP_DISPLAYNAME'] != CONFIG['MOZ_APP_BASENAME']:
|
|
|
|
appini_defines['MOZ_APP_DISPLAYNAME'] = CONFIG['MOZ_APP_DISPLAYNAME']
|
|
|
|
|
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
|
|
|
appini_defines['MOZ_BUILD_APP_IS_BROWSER'] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_APP_PROFILE']:
|
|
|
|
appini_defines['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
|
|
|
|
|
2020-03-26 03:57:13 +03:00
|
|
|
for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR', 'MOZ_UPDATER'):
|
2016-11-02 11:16:56 +03:00
|
|
|
if CONFIG[var]:
|
|
|
|
appini_defines[var] = True
|
|
|
|
|
2020-04-23 11:08:39 +03:00
|
|
|
appini_defines['MOZ_APPUPDATE_HOST'] = 'aus5.mozilla.org'
|
|
|
|
if CONFIG['MOZ_APPUPDATE_HOST']:
|
|
|
|
appini_defines['MOZ_APPUPDATE_HOST'] = CONFIG['MOZ_APPUPDATE_HOST']
|
|
|
|
|
2019-10-08 00:15:19 +03:00
|
|
|
GeneratedFile(
|
|
|
|
'application.ini',
|
|
|
|
script='../python/mozbuild/mozbuild/action/preprocessor.py',
|
|
|
|
entry_point='generate',
|
|
|
|
inputs=['application.ini.in'],
|
|
|
|
flags=['-D%s=%s' % (k, '1' if v is True else v)
|
2020-03-13 00:05:26 +03:00
|
|
|
for k, v in sorted(appini_defines.items(), key=lambda t: t[0])])
|
2020-04-23 11:08:39 +03:00
|
|
|
|
2016-11-02 11:16:56 +03:00
|
|
|
FINAL_TARGET_FILES += ['!application.ini']
|
2015-04-15 23:04:49 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
|
2015-11-27 03:09:07 +03:00
|
|
|
FINAL_TARGET_PP_FILES += ['update-settings.ini']
|
2016-02-09 08:36:07 +03:00
|
|
|
|
2019-10-08 00:15:19 +03:00
|
|
|
GeneratedFile('application.ini.h', script='appini_header.py',
|
|
|
|
inputs=['!application.ini'])
|
2016-03-21 18:45:03 +03:00
|
|
|
|
2020-06-26 13:41:26 +03:00
|
|
|
|
2016-03-21 18:45:03 +03:00
|
|
|
# Put a .lldbinit in the bin directory and the objdir, to be picked up
|
|
|
|
# automatically by LLDB when we debug executables using either of those two
|
|
|
|
# directories as the current working directory. The .lldbinit file will
|
|
|
|
# load $(topsrcdir)/.lldbinit, which is where the actual debugging commands are.
|
|
|
|
DEFINES['topsrcdir'] = TOPSRCDIR
|
2019-03-28 01:37:58 +03:00
|
|
|
DEFINES['topobjdir'] = TOPOBJDIR
|
2016-03-21 18:45:03 +03:00
|
|
|
FINAL_TARGET_PP_FILES += ['.lldbinit.in']
|
|
|
|
OBJDIR_FILES += ['!/dist/bin/.lldbinit']
|
|
|
|
|
|
|
|
# Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
|
|
|
|
# the vim plugin YouCompleteMe.
|
|
|
|
OBJDIR_FILES += ['/.ycm_extra_conf.py']
|
|
|
|
|
|
|
|
if CONFIG['MOZ_VALGRIND']:
|
|
|
|
OBJDIR_FILES._valgrind += [
|
|
|
|
'valgrind/cross-architecture.sup',
|
2018-01-27 04:22:56 +03:00
|
|
|
'valgrind/i386-pc-linux-gnu.sup',
|
|
|
|
'valgrind/x86_64-pc-linux-gnu.sup',
|
2016-03-21 18:45:03 +03:00
|
|
|
]
|