aboutsummaryrefslogtreecommitdiffstats
path: root/qbs-resources
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-05-07 17:51:04 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-05-14 07:57:22 +0000
commit16ddc075c3e132eab0f52507e72237fd7e7bd9b9 (patch)
tree78decc49aecaed5ccea3e091528745166b4d2e99 /qbs-resources
parent7e15ee6ab3bc585a9bbcda61f6b54dd763102b0a (diff)
qbs build: Fix excessive clang 10 warnings triggered by Qt headers
Change-Id: Ifbeae178a53f003fed9fdbbfae433a85ef261fb7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qbs-resources')
-rw-r--r--qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs10
1 files changed, 7 insertions, 3 deletions
diff --git a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs
index 10ba78045..ffa61ec03 100644
--- a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs
+++ b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs
@@ -55,9 +55,13 @@ Module {
var flags = [];
if (enableAddressSanitizer)
flags.push("-fno-omit-frame-pointer");
- if (!qbs.toolchain.contains("clang")
- && Utilities.versionCompare(cpp.compilerVersion, "9") >= 0) {
- flags.push("-Wno-deprecated-copy", "-Wno-init-list-lifetime");
+ function isClang() { return qbs.toolchain.contains("clang"); }
+ function versionAtLeast(v) {
+ return Utilities.versionCompare(cpp.compilerVersion, v) >= 0;
+ };
+ if ((!isClang() && versionAtLeast("9"))
+ || (isClang() && !qbs.hostOS.contains("darwin") && versionAtLeast("10"))) {
+ flags.push("-Wno-deprecated-copy", "-Wno-constant-logical-operand");
}
return flags;
}