commit 3e8f3fcba8c19c743ac4508271780ea0c5449c4c
parent 30953e6fa75d5030062cfb0a40776dd64aa71158
Author: iulian moraru <imoraru@mozilla.com>
Date: Tue, 11 Nov 2025 04:13:57 +0200
Revert "Bug 1998862 - Add the coverage linker flag at the configure level. r=firefox-build-system-reviewers,sergesanspaille" for causing python mozbuild failures on compare-mozconfigs.py.
This reverts commit 27784f804ece302937042a480c037414669d433e.
Diffstat:
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
@@ -8,5 +8,8 @@ ac_add_options --disable-warnings-as-errors
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --enable-coverage
+CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/linux && pwd)"
+export LDFLAGS="--coverage -L$CLANG_LIB_DIR"
+export LIBS="-lclang_rt.profile-x86_64"
export RUSTFLAGS="-Ccodegen-units=1 -Zprofile -Cpanic=abort -Zpanic_abort_tests -Coverflow-checks=off"
export RUSTDOCFLAGS="-Cpanic=abort"
diff --git a/browser/config/mozconfigs/macosx64/code-coverage b/browser/config/mozconfigs/macosx64/code-coverage
@@ -6,5 +6,8 @@ ac_add_options --disable-warnings-as-errors
ac_add_options --without-wasm-sandboxed-libraries
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 -Cpanic=abort -Zpanic_abort_tests -Coverflow-checks=off"
export RUSTDOCFLAGS="-Cpanic=abort"
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
@@ -3178,7 +3178,6 @@ def coverage_cflags(target, c_compiler, build_env):
set_config("COVERAGE_CFLAGS", coverage_cflags)
-add_linker_flag("--coverage", when=code_coverage & building_with_gnu_compatible_cc)
# Assembler detection
# ==============================================================