summaryrefslogtreecommitdiffstats
path: root/mkspecs/common
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2019-11-01 13:21:33 +0100
committerRobert Loehning <robert.loehning@qt.io>2019-11-14 15:45:02 +0100
commit6e42ed217c58341966f41df31f47ed05a1f61a42 (patch)
tree01d94fd54687401b211089d89d191335ac8a894e /mkspecs/common
parent0ec40c21c13232906bbbf26a16278fb0da263722 (diff)
configure: Add sanitizer "fuzzer-no-link"
Adds instrumentation for fuzzing to the binaries but links to the usual main function instead of a fuzzer's. The similar sanitizer "fuzzer" should then be used only for building the test itself. Requires clang 6 or higher. Change-Id: I24ee1f018b0b97f2977dc86fbdc29a164d7c4e01 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'mkspecs/common')
-rw-r--r--mkspecs/common/sanitize.conf4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkspecs/common/sanitize.conf b/mkspecs/common/sanitize.conf
index 5e09406cfb..8417fa4c2f 100644
--- a/mkspecs/common/sanitize.conf
+++ b/mkspecs/common/sanitize.conf
@@ -17,6 +17,10 @@ QMAKE_SANITIZE_MEMORY_CFLAGS = -fsanitize=memory
QMAKE_SANITIZE_MEMORY_CXXFLAGS = -fsanitize=memory
QMAKE_SANITIZE_MEMORY_LFLAGS = -fsanitize=memory
+QMAKE_SANITIZE_FUZZERNL_CFLAGS = -fsanitize=fuzzer-no-link
+QMAKE_SANITIZE_FUZZERNL_CXXFLAGS = -fsanitize=fuzzer-no-link
+QMAKE_SANITIZE_FUZZERNL_LFLAGS = -fsanitize=fuzzer-no-link
+
QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined
QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined
QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined