diff options
| author | jvoisin | 2017-10-05 16:55:41 +0200 |
|---|---|---|
| committer | GitHub | 2017-10-05 16:55:41 +0200 |
| commit | 0527dd3ddec3ad75ecb296ecdb55fbe4c2ad4418 (patch) | |
| tree | 0725db978191d139555e2e3b58cb1d32b86f1f60 /Makefile | |
| parent | b769b7d6b9409b3f0d1dd8410fecbeae2e2ddd0c (diff) | |
Use clang on travis-ci (#23)
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -21,6 +21,13 @@ debug: ## compile a debug build | |||
| 21 | 21 | ||
| 22 | coverage: ## compile snuffleugpaus, and run the testsuite with coverage | 22 | coverage: ## compile snuffleugpaus, and run the testsuite with coverage |
| 23 | cd src; phpize | 23 | cd src; phpize |
| 24 | ifeq ($(CC),clang) | ||
| 25 | cd src; CFLAGS="-fprofile-instr-generate -fcoverage-mapping" ./configure --enable-snuffleupagus | ||
| 26 | make -C src | ||
| 27 | LLVM_PROFILE_FILE="sp_%p_%m.profraw" TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test | ||
| 28 | llvm-profdata-4.0 merge ./src/*.profraw -o ./src/sp.profdata | ||
| 29 | llvm-cov report -instr-profile=./src/sp.profdata ./src/modules/snuffleupagus.so | ||
| 30 | else | ||
| 24 | cd src; ./configure --enable-snuffleupagus --enable-coverage | 31 | cd src; ./configure --enable-snuffleupagus --enable-coverage |
| 25 | make -C src | 32 | make -C src |
| 26 | rm -Rf src/COV.html | 33 | rm -Rf src/COV.html |
| @@ -28,6 +35,7 @@ coverage: ## compile snuffleugpaus, and run the testsuite with coverage | |||
| 28 | lcov --base-directory ./src --directory ./src -c -o ./src/COV.info --rc lcov_branch_coverage=1 | 35 | lcov --base-directory ./src --directory ./src -c -o ./src/COV.info --rc lcov_branch_coverage=1 |
| 29 | lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1 | 36 | lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1 |
| 30 | genhtml -o src/COV.html ./src/COV.info --branch-coverage | 37 | genhtml -o src/COV.html ./src/COV.info --branch-coverage |
| 38 | endif | ||
| 31 | 39 | ||
| 32 | bench: joomla ## run the benchmark | 40 | bench: joomla ## run the benchmark |
| 33 | 41 | ||
