From 6e42ed217c58341966f41df31f47ed05a1f61a42 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 1 Nov 2019 13:21:33 +0100 Subject: 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 --- configure.json | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'configure.json') diff --git a/configure.json b/configure.json index ce71e67993..105b51a81c 100644 --- a/configure.json +++ b/configure.json @@ -895,6 +895,12 @@ "autoDetect": false, "output": [ "publicConfig" ] }, + "sanitize_fuzzer_no_link": { + "label": "Fuzzer (instrumentation only)", + "autoDetect": false, + "output": [ "publicConfig" ], + "purpose": [ "Adds instrumentation for fuzzing to the binaries but links to the usual main function instead of a fuzzer's." ] + }, "sanitize_undefined": { "label": "Undefined", "autoDetect": false, @@ -902,7 +908,7 @@ }, "sanitizer": { "label": "Sanitizers", - "condition": "features.sanitize_address || features.sanitize_thread || features.sanitize_memory || features.sanitize_undefined", + "condition": "features.sanitize_address || features.sanitize_thread || features.sanitize_memory || features.sanitize_fuzzer_no_link || features.sanitize_undefined", "output": [ "sanitizer", "publicConfig" ] }, "coverage_trace_pc_guard": { @@ -1444,6 +1450,11 @@ Qt can be built in release mode with separate debug information, so "type": "error", "condition": "features.coverage && !config.clang", "message": "Command line option -coverage is only supported with clang compilers." + }, + { + "type": "error", + "condition": "features.sanitize_fuzzer_no_link && !config.clang", + "message": "Command line option -sanitize fuzzer-no-link is only supported with clang compilers." } ], @@ -1581,7 +1592,13 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5 { "section": "Sanitizers", "condition": "features.sanitizer", - "entries": [ "sanitize_address", "sanitize_thread", "sanitize_memory", "sanitize_undefined" ] + "entries": [ + "sanitize_address", + "sanitize_thread", + "sanitize_memory", + "sanitize_fuzzer_no_link", + "sanitize_undefined" + ] }, { "message": "Code Coverage Instrumentation", -- cgit v1.2.3