Skip to content

Commit

Permalink
Cleanup after recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Aug 24, 2022
1 parent 33c27a2 commit 08812bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Publish coverage-report
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: llvm-cov-report
folder: coverage-report
repository-name: '' # TODO Destination
token: ${{ secrets.COVERAGE_DEPLOY_TOKEN }} # TODO: Use an organization-level token
single-commit: true
8 changes: 5 additions & 3 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ abs_builddir= @abs_builddir@
CC= @CC@
CXX= @CXX@
LINKCC= @LINKCC@
CC_NAME=@CC_NAME@
AR= @AR@
READELF= @READELF@
SOABI= @SOABI@
Expand Down Expand Up @@ -657,8 +656,9 @@ bolt-opt: @PREBOLT_RULE@
rm -f $(BUILDPYTHON).bolt_inst
mv $(BUILDPYTHON).bolt $(BUILDPYTHON)

# Support generating coverage reports
.PHONY=coverage-report coverage coverage-generate-lcov coverage-generate-profdata
coverage-report:
coverage-report: regen-token regen-frozen
@ # build with coverage info
$(MAKE) coverage
@ # run tests, ignore failures
Expand All @@ -675,7 +675,9 @@ coverage-report:
coverage:
@echo "Building with support for coverage checking:"
$(MAKE) clean
$(MAKE) @DEF_MAKE_RULE@ CC="$(COVERAGE_CC)" CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS)" LDFLAGS="$(LDFLAGS) $(COVERAGE_LDFLAGS)"
$(MAKE) @DEF_MAKE_RULE@ CC="$(COVERAGE_CC)" \
CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS)" \
LDFLAGS="$(LDFLAGS) $(COVERAGE_LDFLAGS)"

coverage-generate-lcov:
@echo "Creating Coverage HTML report with LCOV:"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
The ``coverage-report`` Makefile target will now automatically use ``llvm-cov`` to generate a coverage report when using ``clang``.
This provides more details about branch coverage and subexpressions than the existing ``gcc`` and ``lcov`` based ``coverage-report``.
The ``coverage-report`` Makefile now supports both the ``gcc/lcov`` and ``clang/llvm-profdata`` stacks to generate coverage reports, and will select the correct one based on the compiler in use.

0 comments on commit 08812bc

Please sign in to comment.