summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorjvoisin2017-10-05 16:55:41 +0200
committerGitHub2017-10-05 16:55:41 +0200
commit0527dd3ddec3ad75ecb296ecdb55fbe4c2ad4418 (patch)
tree0725db978191d139555e2e3b58cb1d32b86f1f60 /Makefile
parentb769b7d6b9409b3f0d1dd8410fecbeae2e2ddd0c (diff)
Use clang on travis-ci (#23)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 441c2f1..2a99cf6 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,13 @@ debug: ## compile a debug build
21 21
22coverage: ## compile snuffleugpaus, and run the testsuite with coverage 22coverage: ## compile snuffleugpaus, and run the testsuite with coverage
23 cd src; phpize 23 cd src; phpize
24ifeq ($(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
30else
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
38endif
31 39
32bench: joomla ## run the benchmark 40bench: joomla ## run the benchmark
33 41