d5576b1cb8
GCC and Clang support compiler intrinsic error detections tools: address, memory, thread, undefined Let users conveniently enable it in qmake, for instance with CONFIG += sanitizer sanitize_address Also add a -sanitize [...] option to configure to use it by default for both the Qt libraries, and user applications. [ChangeLog][configure] Added support for GCC/Clang -fsanitize= options Change-Id: Ie5418abcdf41842566df510d7707e41739e66f87 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
24 lines
844 B
Plaintext
24 lines
844 B
Plaintext
#
|
|
# Qmake configuration for the GCC / Clang sanitize features
|
|
#
|
|
|
|
QMAKE_COMMON_SANITIZE_CFLAGS = -fno-omit-frame-pointer
|
|
QMAKE_COMMON_SANITIZE_CXXFLAGS = -fno-omit-frame-pointer
|
|
|
|
QMAKE_SANITIZE_ADDRESS_CFLAGS = -fsanitize=address
|
|
QMAKE_SANITIZE_ADDRESS_CXXFLAGS = -fsanitize=address
|
|
QMAKE_SANITIZE_ADDRESS_LFLAGS = -fsanitize=address
|
|
|
|
QMAKE_SANITIZE_THREAD_CFLAGS = -fsanitize=thread
|
|
QMAKE_SANITIZE_THREAD_CXXFLAGS = -fsanitize=thread
|
|
QMAKE_SANITIZE_THREAD_LFLAGS = -fsanitize=thread
|
|
|
|
QMAKE_SANITIZE_MEMORY_CFLAGS = -fsanitize=memory
|
|
QMAKE_SANITIZE_MEMORY_CXXFLAGS = -fsanitize=memory
|
|
QMAKE_SANITIZE_MEMORY_LFLAGS = -fsanitize=memory
|
|
|
|
QMAKE_SANITIZE_UNDEFINED_CFLAGS = -fsanitize=undefined
|
|
QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined
|
|
QMAKE_SANITIZE_UNDEFINED_LFLAGS = -fsanitize=undefined
|
|
|