summaryrefslogtreecommitdiffstats
path: root/mkspecs/common/clang.conf
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2019-12-19 17:51:21 +0100
committerRobert Loehning <robert.loehning@qt.io>2020-01-28 20:26:15 +0000
commit94bc57213f9a8a74e9e7520de68d7bba7f42ea4c (patch)
tree129ab902c9e3dc54183b583d6159dd9642882a72 /mkspecs/common/clang.conf
parenta611c632bb906cf77dd3af29ddd7b166f79ad1b0 (diff)
configure: Add switch for clang's "source-based" code coverage feature
This adds instrumentation to the binaries. At the end of their execution, these will then write a file containing information which code was executed. This can be used for code coverage analysis. [ChangeLog][QtCore][configure] Add switch "-coverage source-based" to enable clang's "source-based" code coverage feature. This can be used for code coverage analysis. Change-Id: If31c6849aa797ff8820e041e85a492a14e2f1a6b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'mkspecs/common/clang.conf')
-rw-r--r--mkspecs/common/clang.conf4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index aead581478..2499c8b6d8 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -54,3 +54,7 @@ QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s"
QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+
+QMAKE_CFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping
+QMAKE_CXXFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping
+QMAKE_LFLAGS_COVERAGE_SOURCE_BASED = -fprofile-instr-generate -fcoverage-mapping