Gcc: Support -stdlib=whatever arguments for the code model

Switching the stdlib implementation is possible with clang and results
in different include pathes being used (and potentially different defines).

Change-Id: I9c856256f51ceded9dc7892c1dde2bcc8c1b024c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2012-11-20 17:30:05 +01:00
parent 22c3bd244f
commit 75c36c9bb5
9 changed files with 34 additions and 17 deletions

View File

@@ -250,10 +250,11 @@ void GenericProject::refresh(RefreshOptions options)
Kit *k = activeTarget() ? activeTarget()->kit() : KitManager::instance()->defaultKit();
ToolChain *tc = k ? ToolChainKitInformation::toolChain(k) : 0;
if (tc) {
part->defines = tc->predefinedMacros(QStringList());
QStringList cxxflags; // FIXME: Can we do better?
part->defines = tc->predefinedMacros(cxxflags);
part->defines += '\n';
foreach (const HeaderPath &headerPath, tc->systemHeaderPaths(SysRootKitInformation::sysRoot(k))) {
foreach (const HeaderPath &headerPath, tc->systemHeaderPaths(cxxflags, SysRootKitInformation::sysRoot(k))) {
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
part->frameworkPaths.append(headerPath.path());
else