summaryrefslogtreecommitdiffstats
path: root/src/core/config
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-12-14 12:45:44 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-10 17:09:18 +0000
commit0b406584b711e5c6e12baeb15e10045f02914af4 (patch)
tree001ae66482f34f58c557fbb166c72cca7fec2d93 /src/core/config
parent8c4904e6079aa54dded654f8617e0f85a33aa6e1 (diff)
Fix sanitizer build
Task-number: QTBUG-64726 Change-Id: Ic88eed62e85ad1d95afcbd154c6556509e42bd47 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/config')
-rw-r--r--src/core/config/common.pri12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/config/common.pri b/src/core/config/common.pri
index d8a4fa181..d9dd7d7fd 100644
--- a/src/core/config/common.pri
+++ b/src/core/config/common.pri
@@ -62,3 +62,15 @@ CONFIG(debug, debug|release) {
# Compiling with -Os makes a huge difference in binary size
optimize_size: gn_args += optimize_for_size=true
+
+# We don't want to apply sanitizer options to the build tools (GN, dict convert, etc).
+!host_build {
+ sanitizer: gn_args += sanitizer_keep_symbols=true
+ sanitize_address: gn_args += is_asan=true
+ sanitize_thread: gn_args += is_tsan=true
+ sanitize_memory: gn_args += is_msan=true
+ # rtti is required for a specific check of ubsan, -fsanitize=vptr, which uses the runtime
+ # type information to check that correct derived objects are assigned to base pointers. Without
+ # rtti, linking would fail at build time.
+ sanitize_undefined: gn_args += is_ubsan=true use_rtti=true
+}