aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@digia.com>2014-07-10 11:37:30 +0200
committerFawzi Mohamed <fawzi.mohamed@digia.com>2014-07-24 14:05:58 +0200
commit9e040c1765a5e65de87da6817305c47cba6a3555 (patch)
tree21ffc988765698ac4702b952383521fd7a2448b9
parentbbae2f5918ec902533c769387f32d53bf8582bb0 (diff)
qtprofile,clang: add libc++ on iOS and OSX for compilation and linking
Change-Id: I8e1964238231ecf87ab5df8b036b79a6c7348a61 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r--src/lib/qtprofilesetup/templates/core.qbs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/qtprofilesetup/templates/core.qbs b/src/lib/qtprofilesetup/templates/core.qbs
index 3c95d21db..0d1e12c49 100644
--- a/src/lib/qtprofilesetup/templates/core.qbs
+++ b/src/lib/qtprofilesetup/templates/core.qbs
@@ -105,7 +105,13 @@ Module {
libs = libs.concat(dynamicLibs);
return libs;
}
- cpp.linkerFlags: coreLinkerFlags
+ cpp.linkerFlags: {
+ var flags = coreLinkerFlags;
+ if (qbs.targetOS.contains('darwin') && qbs.toolchain.contains('clang')
+ && config.contains('c++11'))
+ flags.push('-stdlib=libc++');
+ return flags;
+ }
cpp.frameworkPaths: coreFrameworkPaths.concat(frameworkBuild ? [libPath] : [])
cpp.frameworks: {
var frameworks = coreFrameworks
@@ -126,7 +132,8 @@ Module {
if (versionMajor < 5)
flags.push('/Zc:wchar_t-');
}
- if (qbs.toolchain.contains('clang') && config.contains('c++11'))
+ if (qbs.targetOS.contains('darwin') && qbs.toolchain.contains('clang')
+ && config.contains('c++11'))
flags.push('-stdlib=libc++');
return flags;
}