Backed out 2 changesets (bug 1476339, bug 1590714) for breaking windows coverage builds and at marco's request.

Backed out changeset 0a3621d900c8 (bug 1590714)
Backed out changeset db0e1ce31ac3 (bug 1476339)

--HG--
extra : rebase_source : 2421340b6220f0858ee449a1f5bc26bf3316943b
This commit is contained in:
Cosmin Sabou 2019-10-23 23:10:17 +03:00
Родитель 43ab4ea7a3
Коммит b9bc1ef9d6
6 изменённых файлов: 18 добавлений и 28 удалений

Просмотреть файл

@ -21,7 +21,9 @@ ac_add_options --disable-profiling
ac_add_options --disable-warnings-as-errors
ac_add_options --enable-coverage
export LDFLAGS="-Wl,--compress-debug-sections=zlib"
export CFLAGS="--coverage"
export CXXFLAGS="--coverage"
export LDFLAGS="--coverage -Wl,--compress-debug-sections=zlib"
# gold is required for libFuzzer to work properly
ac_add_options --enable-gold

Просмотреть файл

@ -13,6 +13,6 @@ ac_add_options --disable-warnings-as-errors
ac_add_options --enable-coverage
CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/linux && pwd)"
export LDFLAGS="-L$CLANG_LIB_DIR"
export LDFLAGS="--coverage -L$CLANG_LIB_DIR"
export LIBS="-lclang_rt.profile-x86_64"
export RUSTFLAGS="-Ccodegen-units=1 -Zprofile -Zno-landing-pads -Clink-dead-code -Coverflow-checks=off"

Просмотреть файл

@ -8,4 +8,7 @@ ac_add_options --disable-sandbox
ac_add_options --disable-warnings-as-errors
ac_add_options --enable-coverage
CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/darwin && pwd)"
export LDFLAGS="-coverage -L$CLANG_LIB_DIR"
export LIBS="-lclang_rt.profile_osx"
export RUSTFLAGS="-Ccodegen-units=1 -Zprofile -Zno-landing-pads -Clink-dead-code -Coverflow-checks=off"

Просмотреть файл

@ -18,6 +18,13 @@ export MOZILLA_OFFICIAL=1
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
if [ -d "$MOZ_FETCHES_DIR/clang" ]; then
CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/windows && pwd)"
export LIB=$LIB:$CLANG_LIB_DIR
export LDFLAGS="clang_rt.profile-x86_64.lib"
fi
export RUSTFLAGS="-Ccodegen-units=1 -Zprofile -Zno-landing-pads -Clink-dead-code -Coverflow-checks=off"
. "$topsrcdir/build/mozconfig.common.override"

Просмотреть файл

@ -1812,11 +1812,10 @@ set_config('MOZ_CODE_COVERAGE', code_coverage)
set_define('MOZ_CODE_COVERAGE', code_coverage)
@depends(target, c_compiler, vc_path, check_build_environment, when=code_coverage)
@imports('os')
@imports('re')
@imports('mozpack.path')
@imports(_from='__builtin__', _import='open')
def coverage_flags(target, c_compiler, vc_path, build_env):
def coverage_cflags(target, c_compiler, vc_path, build_env):
cflags = ['--coverage']
if c_compiler.type in ('clang', 'clang-cl'):
@ -1844,28 +1843,9 @@ def coverage_flags(target, c_compiler, vc_path, build_env):
with open(response_file_path, 'w') as f:
f.write(' '.join(cflags))
cflags = ['@{}'.format(response_file_path)]
return ['@{}'.format(response_file_path)]
if target.os == 'WINNT':
if c_compiler.type == 'clang-cl':
if target.cpu == 'x86_64':
ldflags = ['clang_rt.profile-x86_64.lib']
elif target.cpu == 'x86':
ldflags = ['clang_rt.profile-i386.lib']
else:
ldflags = None
elif target.os == 'OSX':
ldflags = ['-coverage']
else:
ldflags = ['--coverage']
return namespace(
cflags=cflags,
ldflags=ldflags,
)
set_config('COVERAGE_CFLAGS', coverage_flags.cflags)
set_config('COVERAGE_LDFLAGS', coverage_flags.ldflags)
set_config('COVERAGE_CFLAGS', coverage_cflags)
# ==============================================================

Просмотреть файл

@ -401,7 +401,6 @@ class LinkFlags(BaseCompileFlags):
('OPTIMIZE', (context.config.substs.get('MOZ_OPTIMIZE_LDFLAGS', []) if
context.config.substs.get('MOZ_OPTIMIZE') else []),
('LDFLAGS',)),
('COVERAGE_LDFLAGS', context.config.substs.get('COVERAGE_LDFLAGS'), ('LDFLAGS',)),
)
BaseCompileFlags.__init__(self, context)
@ -473,8 +472,7 @@ class CompileFlags(BaseCompileFlags):
('CFLAGS', 'C_LDFLAGS')),
('MOZBUILD_CFLAGS', None, ('CFLAGS',)),
('MOZBUILD_CXXFLAGS', None, ('CXXFLAGS',)),
('COVERAGE_CFLAGS', context.config.substs.get('COVERAGE_CFLAGS'),
('CXXFLAGS', 'CFLAGS')),
('COVERAGE', context.config.substs.get('COVERAGE_CFLAGS'), ('CXXFLAGS', 'CFLAGS')),
)
BaseCompileFlags.__init__(self, context)