diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-08-29 15:36:23 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-08-31 08:51:16 +0000 |
commit | ac7351024345ef6730e9d3b575979be20991ff88 (patch) | |
tree | 6c779e9b463064cf5a59925294599b4f8137a641 /qbs-resources | |
parent | 2618e3cc308598be7799bf31bc8d08d9115c6e43 (diff) |
qbs build: Allow building with address sanitizer
Change-Id: I339f5d986acd99240f388b83bfc29acfd19939ba
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'qbs-resources')
-rw-r--r-- | qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs index 34e451267..bcdf4efd2 100644 --- a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs +++ b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs @@ -6,6 +6,7 @@ Module { condition: project.withCode name: "cpp" } + property bool enableAddressSanitizer: false property bool enableUnitTests: false property bool enableProjectFileUpdates: false property bool enableRPath: true @@ -44,4 +45,10 @@ Module { property string pluginsInstallDir: libDirName + "/qbs/plugins" property string qmlTypeDescriptionsInstallDir: FileInfo.joinPaths(resourcesInstallDir, "share/qbs/qml-type-descriptions") + + Properties { + condition: project.withCode && enableAddressSanitizer && qbs.toolchain.contains("gcc") + cpp.cxxFlags: "-fno-omit-frame-pointer" + cpp.driverFlags: "-fsanitize=address" + } } |