зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1549762 - Don't build mozglue linker tests if building with icecream. r=glandium
As icecream doesn't deal well with .incbin. Differential Revision: https://phabricator.services.mozilla.com/D30951 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fe64901ac4
Коммит
c74f3a885b
|
@ -257,7 +257,8 @@ js_option(env='CCACHE_PREFIX',
|
|||
nargs=1,
|
||||
help='Compiler prefix to use when using ccache')
|
||||
|
||||
set_config('CCACHE_PREFIX', depends_if('CCACHE_PREFIX')(lambda prefix: prefix[0]))
|
||||
ccache_prefix = depends_if('CCACHE_PREFIX')(lambda prefix: prefix[0])
|
||||
set_config('CCACHE_PREFIX', ccache_prefix)
|
||||
|
||||
# Distinguish ccache from sccache.
|
||||
|
||||
|
@ -1167,12 +1168,15 @@ host_cxx_compiler = compiler('C++', host, c_compiler=host_c_compiler,
|
|||
building_with_gcc = depends(c_compiler)(lambda info: info.type == 'gcc')
|
||||
|
||||
|
||||
@depends(cxx_compiler)
|
||||
@depends(cxx_compiler, ccache_prefix)
|
||||
@imports('os')
|
||||
def cxx_is_icecream(info):
|
||||
def cxx_is_icecream(info, ccache_prefix):
|
||||
if (os.path.islink(info.compiler) and os.path.basename(
|
||||
os.readlink(info.compiler)) == 'icecc'):
|
||||
return True
|
||||
if ccache_prefix and os.path.basename(ccache_prefix) == 'icecc':
|
||||
return True
|
||||
|
||||
set_config('CXX_IS_ICECREAM', cxx_is_icecream)
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,17 @@ DEFINES['IMPL_MFBT'] = True
|
|||
|
||||
DisableStlWrapping()
|
||||
|
||||
TEST_DIRS += ['tests']
|
||||
# Avoid building the linker tests if building with icecc since it doesn't deal
|
||||
# well with .incbin.
|
||||
#
|
||||
# A better solution would be to set ICECC=no in the environment before building
|
||||
# these objects to force the local build, but moz.build lacks such a capability
|
||||
# at the moment.
|
||||
#
|
||||
# TODO: Remove this when https://github.com/icecc/icecream/pull/463 is merged
|
||||
# and in a release.
|
||||
if not CONFIG['CXX_IS_ICECREAM']:
|
||||
TEST_DIRS += ['tests']
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
|
|
|
@ -218,10 +218,7 @@ def get_build_opts(substs):
|
|||
compiler = substs.get('CC_TYPE', None)
|
||||
if compiler:
|
||||
opts['compiler'] = str(compiler)
|
||||
# icecream may be enabled by setting CC/CXX to symlinks to icecc,
|
||||
# or if using it together with ccache by setting CCACHE_PREFIX=icecc.
|
||||
prefix = os.path.basename(substs.get('CCACHE_PREFIX', ''))
|
||||
if substs.get('CXX_IS_ICECREAM', None) or prefix == 'icecc':
|
||||
if substs.get('CXX_IS_ICECREAM', None):
|
||||
opts['icecream'] = True
|
||||
return opts
|
||||
except BuildEnvironmentNotFoundException:
|
||||
|
|
Загрузка…
Ссылка в новой задаче