diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-15 09:50:42 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-15 18:41:35 +0200 |
commit | 7e03bc39b8bcdaa4e83e72ac99e117561c124951 (patch) | |
tree | f0868935cfefc6ca18963f9527ea91ce40c419fd /configure.cmake | |
parent | 29ad4f8c09d09fc0170f0395eef9503b521ec203 (diff) |
CMake: Improve sanitizer detection
The change fixes the labels to show up correctly in the configure
summary.
It also allows enabling the sanitizer via the feature flags, e.g.
-DFEATURE_sanitize_address=ON.
Finally the qtbase sanitizer option is saved in QtBuildInternalsExtra
so that repos built after qtbase have the same sanitizer options
enabled.
Change-Id: Ic9d9e3ce3c7ebbc244ced2e6d163d1ac8ee06b12
Fixes: QTBUG-84721
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index 3863f34285..b229e4df2c 100644 --- a/configure.cmake +++ b/configure.cmake @@ -467,12 +467,37 @@ qt_feature("testcocoon" AUTODETECT OFF ) qt_feature_config("testcocoon" QMAKE_PUBLIC_CONFIG) +qt_feature("sanitize_address" + LABEL "Addresses" + AUTODETECT OFF +) +qt_feature_config("sanitize_address" QMAKE_PUBLIC_CONFIG) +qt_feature("sanitize_thread" + LABEL "Threads" + AUTODETECT OFF +) +qt_feature_config("sanitize_thread" QMAKE_PUBLIC_CONFIG) +qt_feature("sanitize_memory" + LABEL "Memory" + AUTODETECT OFF +) +qt_feature_config("sanitize_memory" QMAKE_PUBLIC_CONFIG) qt_feature("sanitize_fuzzer_no_link" LABEL "Fuzzer (instrumentation only)" PURPOSE "Adds instrumentation for fuzzing to the binaries but links to the usual main function instead of a fuzzer's." AUTODETECT OFF ) qt_feature_config("sanitize_fuzzer_no_link" QMAKE_PUBLIC_CONFIG) +qt_feature("sanitize_undefined" + LABEL "Undefined" + AUTODETECT OFF +) +qt_feature_config("sanitize_undefined" QMAKE_PUBLIC_CONFIG) +qt_feature("sanitizer" + LABEL "Sanitizers" + CONDITION QT_FEATURE_sanitize_address OR QT_FEATURE_sanitize_thread OR QT_FEATURE_sanitize_memory OR QT_FEATURE_sanitize_fuzzer_no_link OR QT_FEATURE_sanitize_undefined +) +qt_feature_config("sanitizer" QMAKE_PUBLIC_CONFIG) qt_feature("coverage_trace_pc_guard" LABEL "trace-pc-guard" AUTODETECT OFF |