qbs: apply compiler and linker flags from GCC toolchains.

Change-Id: I27ce0b11238a2a0c9e5f2f1f8d9e5ecfa3cc51f9
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Jake Petroules
2016-05-13 23:22:12 -07:00
parent 8c8ed3294f
commit ac9360a2c1
2 changed files with 8 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
#include "qbsconstants.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/gcctoolchain.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/toolchain.h>
@@ -255,6 +256,11 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
}
data.insert(QLatin1String(CPP_TOOLCHAINPATH), cxxFileInfo.absolutePath());
if (ProjectExplorer::GccToolChain *gcc = dynamic_cast<ProjectExplorer::GccToolChain *>(tc)) {
data.insert(QLatin1String(CPP_PLATFORMCOMMONCOMPILERFLAGS), gcc->platformCodeGenFlags());
data.insert(QLatin1String(CPP_PLATFORMLINKERFLAGS), gcc->platformLinkerFlags());
}
// TODO: Remove this once compiler version properties are set for MSVC
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {