CMake: Fix the -sanitize configure option

This needs to map to ECM_ENABLE_SANITIZERS.

Fixes: QTBUG-87316
Change-Id: I9e983728af0ba69fd428944e647f0afae8c61772
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-10-09 16:14:50 +02:00
parent 7643295c12
commit 18357033b4
3 changed files with 11 additions and 1 deletions

View File

@ -230,6 +230,14 @@ function(qtConfCommandlineSetInput name val)
set_property(GLOBAL APPEND PROPERTY CONFIG_INPUTS ${name})
endfunction()
function(qtConfCommandlineAppendInput name val)
get_property(oldval GLOBAL PROPERTY INPUT_${name})
if(NOT "${oldval}" STREQUAL "")
string(PREPEND val "${oldval};")
endif()
qtConfCommandlineSetInput(${name} "${val}")
endfunction()
function(qtConfValidateValue opt val out_var)
set(${out_var} TRUE PARENT_SCOPE)
@ -565,6 +573,7 @@ endif()
translate_string_input(platform QT_QMAKE_TARGET_MKSPEC)
translate_string_input(xplatform QT_QMAKE_TARGET_MKSPEC)
translate_string_input(qpa_default_platform QT_QPA_DEFAULT_PLATFORM)
translate_list_input(sanitize ECM_ENABLE_SANITIZERS)
translate_path_input(android-sdk ANDROID_SDK_ROOT)
if(DEFINED INPUT_android-ndk)

View File

@ -53,7 +53,7 @@ The effort of this is tracked in QTBUG-85373 and QTBUG-85349.
| -gcov | | |
| -trace [backend] | -DINPUT_trace=yes or -DINPUT_trace=<backend> | |
| | or -DFEATURE_<backend> | |
| -sanitize <arg> | -DFEATURE_sanitize_<arg> | |
| -sanitize address -sanitize undefined | -DECM_ENABLE_SANITIZERS=address;undefined | |
| -coverage <arg> | | |
| -c++std c++2a | -DFEATURE_cxx2a=ON | |
| -sse2/-sse3/-ssse3/-sse4.1 | -DFEATURE_sse4=ON | |

View File

@ -191,5 +191,6 @@ function(qt_commandline_sanitize arg val nextok)
else()
qtConfAddError("Invalid argument '${val}' to command line parameter '${arg}'")
endif()
qtConfCommandlineAppendInput(sanitize "${val}")
endfunction()
# special case end