diff options
author | Robert Loehning <robert.loehning@qt.io> | 2019-11-01 13:21:33 +0100 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2019-11-14 15:45:02 +0100 |
commit | 6e42ed217c58341966f41df31f47ed05a1f61a42 (patch) | |
tree | 01d94fd54687401b211089d89d191335ac8a894e /configure.json | |
parent | 0ec40c21c13232906bbbf26a16278fb0da263722 (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 'configure.json')
-rw-r--r-- | configure.json | 21 |
1 files changed, 19 insertions, 2 deletions
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", |