forked from qt-creator/qt-creator
qbs build: Only pass "-stdlib=libc++" to clang on Mac.
This is also what the Qt mkspecs do. Otherwise we get linker errors on some installations (where libc++abi is required). Change-Id: I1f204da8825ae4dfd4650b921c8e3f32e0ad6380 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
committed by
Joerg Bornemann
parent
bea8fc8e6a
commit
fbb0d12961
@@ -27,7 +27,9 @@ function commonCxxFlags(qbs)
|
||||
{
|
||||
var flags = [];
|
||||
if (qbs.toolchain.contains("clang")) {
|
||||
flags.push("-std=c++11", "-stdlib=libc++");
|
||||
flags.push("-std=c++11");
|
||||
if (qbs.targetOS.contains("darwin"))
|
||||
flags.push("-stdlib=libc++");
|
||||
} else if (qbs.toolchain.contains("gcc")) {
|
||||
flags.push("-std=c++0x");
|
||||
}
|
||||
@@ -37,7 +39,7 @@ function commonCxxFlags(qbs)
|
||||
function commonLinkerFlags(qbs)
|
||||
{
|
||||
var flags = [];
|
||||
if (qbs.toolchain.contains("clang"))
|
||||
if (qbs.toolchain.contains("clang") && qbs.targetOS.contains("darwin"))
|
||||
flags.push("-stdlib=libc++");
|
||||
return flags;
|
||||
}
|
||||
|
Reference in New Issue
Block a user