Skip to content

Commit 08812bc

Browse files
committed
Cleanup after recent changes
1 parent 33c27a2 commit 08812bc

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/c-coverage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Publish coverage-report
5151
uses: JamesIves/github-pages-deploy-action@v4
5252
with:
53-
folder: llvm-cov-report
53+
folder: coverage-report
5454
repository-name: '' # TODO Destination
5555
token: ${{ secrets.COVERAGE_DEPLOY_TOKEN }} # TODO: Use an organization-level token
5656
single-commit: true

Makefile.pre.in

+5-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ abs_builddir= @abs_builddir@
3737
CC= @CC@
3838
CXX= @CXX@
3939
LINKCC= @LINKCC@
40-
CC_NAME=@CC_NAME@
4140
AR= @AR@
4241
READELF= @READELF@
4342
SOABI= @SOABI@
@@ -657,8 +656,9 @@ bolt-opt: @PREBOLT_RULE@
657656
rm -f $(BUILDPYTHON).bolt_inst
658657
mv $(BUILDPYTHON).bolt $(BUILDPYTHON)
659658

659+
# Support generating coverage reports
660660
.PHONY=coverage-report coverage coverage-generate-lcov coverage-generate-profdata
661-
coverage-report:
661+
coverage-report: regen-token regen-frozen
662662
@ # build with coverage info
663663
$(MAKE) coverage
664664
@ # run tests, ignore failures
@@ -675,7 +675,9 @@ coverage-report:
675675
coverage:
676676
@echo "Building with support for coverage checking:"
677677
$(MAKE) clean
678-
$(MAKE) @DEF_MAKE_RULE@ CC="$(COVERAGE_CC)" CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS)" LDFLAGS="$(LDFLAGS) $(COVERAGE_LDFLAGS)"
678+
$(MAKE) @DEF_MAKE_RULE@ CC="$(COVERAGE_CC)" \
679+
CFLAGS="$(CFLAGS) $(COVERAGE_CFLAGS)" \
680+
LDFLAGS="$(LDFLAGS) $(COVERAGE_LDFLAGS)"
679681

680682
coverage-generate-lcov:
681683
@echo "Creating Coverage HTML report with LCOV:"
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
The ``coverage-report`` Makefile target will now automatically use ``llvm-cov`` to generate a coverage report when using ``clang``.
2-
This provides more details about branch coverage and subexpressions than the existing ``gcc`` and ``lcov`` based ``coverage-report``.
1+
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 commit comments

Comments
 (0)