Commit fbb0d129 authored by Christian Kandeler's avatar Christian Kandeler Committed by Joerg Bornemann

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: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent bea8fc8e
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment