forked from qt-creator/qt-creator
QbsProjectManager: Fix cross-compiling with clang
In order to use a generic clang as a cross-compiler, we have to pass "- target" in the "platform codegen flags" in the toolchain settings. However, qbs errors out when that flag is used directly, so we need to filter it out along with "-arch". Change-Id: Ide83115b046bc53c330e86b5d5715640a4c5ed98 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -233,8 +233,7 @@ static void filterCompilerLinkerFlags(const ProjectExplorer::Abi &targetAbi, QSt
|
||||
{
|
||||
for (int i = 0; i < flags.size(); ) {
|
||||
if (targetAbi.architecture() != ProjectExplorer::Abi::UnknownArchitecture
|
||||
&& flags[i] == QStringLiteral("-arch")
|
||||
&& i + 1 < flags.size()) {
|
||||
&& (flags[i] == "-arch" || flags[i] == "-target") && i + 1 < flags.size()) {
|
||||
flags.removeAt(i);
|
||||
flags.removeAt(i);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user