Details
Description
Libc++ can be build against many different C++ ABI libraries (see http://libcxx.llvm.org/). Therefore qbs should either determine the ABI library itself or offer configuration.
As a workaround I currently set "cpp.cxxStandardLibrary: undefined" and add the needed flags myself to cxxFlags and linkerFlags. While this seems to compile and link fine, qbs prints this warning: "WARNING: Conflicting scalar values" when using other modules that use "cxxStandardLibrary" like qt.
If selection of the ABI library can not be automated then I think you should add a "cxxAbiLibrary" property similar to "cxxStandardLibrary". Im currently using this:
property string cxxAbiLibrary: "libsupc++" PropertyOptions { name: "cxxAbiLibrary" allowedValues: [ "libsupc++", "libc++abi", "libcxxrt" ] description: "version of the C++ABI library to use" } ... cpp.dynamicLibraries: { if ( qbs.toolchain.contains( "clang" ) && cxxStandardLibrary === "libc++" ) { if ( cxxAbiLibrary === "libsupc++" ) { return [ "supc++" ] } else if ( cxxAbiLibrary === "libc++abi" ) { return [ "c++abi" ] } else if ( cxxAbiLibrary === "libcxxrt" ) { return [ "cxxrt" ] } } }
Attachments
For Gerrit Dashboard: QBS-878 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
177651,2 | GCC module: Do not add assume libc++abi with libc++ on Linux | 1.7 | qbs/qbs | Status: MERGED | +2 | 0 |