diff --git a/debian/rules b/debian/rules index 0d561aba..f3240513 100755 --- a/debian/rules +++ b/debian/rules @@ -123,6 +123,15 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) endif endif +ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) +# enable the code coverage + CODECOVERAGE=yes +# for -fvisibility-inlines-hidden see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130729/183016.html + CXXFLAGS_EXTRA += -fprofile-arcs -ftest-coverage + LDFLAGS_EXTRA += -coverage -lgcov + RUN_TEST=yes +endif + # Enable for bootstrap LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig CXXFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig @@ -145,15 +154,6 @@ ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) RUN_TEST=no endif -ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) -# enable the code coverage - CODECOVERAGE=yes -# for -fvisibility-inlines-hidden see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130729/183016.html - CXXFLAGS_EXTRA += -fprofile-arcs -ftest-coverage - LDFLAGS_EXTRA += -coverage -lgcov - RUN_TEST=yes -endif - ifneq (,$(filter scan-build,$(DEB_BUILD_OPTIONS))) # enable the build using scan-build # The package are installed through the variable declarations: