Commit 5aa151ea authored by Tobias Hunger's avatar Tobias Hunger

Toolchain: Fix detection of static libraries

Fix detection of static libraries, add unit test with a known
broken version.

Task-number: QTCREATORBUG-4453
Reviewed-by: con
parent c5178bfb
......@@ -545,7 +545,8 @@ QList<Abi> Abi::abisOfBinary(const QString &path)
&& tmp.at(0).binaryFormat() != Abi::MachOFormat)
break;
f.seek(offset + (offset % 2)); // ar is 2 byte alligned
offset += (offset % 2); // ar is 2 byte alligned
f.seek(offset);
data = f.read(1024);
}
} else {
......@@ -598,10 +599,13 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary_data()
<< (QStringList());
QTest::newRow("static QtCore: win msvc2008")
<< QString::fromLatin1("%1/abi/static/win_msvc2008_release.lib").arg(prefix)
<< QString::fromLatin1("%1/abi/static/win-msvc2008-release.lib").arg(prefix)
<< (QStringList() << QString::fromLatin1("x86-windows-unknown-pe-32bit"));
QTest::newRow("static QtCore: win msvc2008 II")
<< QString::fromLatin1("%1/abi/static/win-msvc2008-release2.lib").arg(prefix)
<< (QStringList() << QString::fromLatin1("x86-windows-unknown-pe-64bit"));
QTest::newRow("static QtCore: win msvc2008 (debug)")
<< QString::fromLatin1("%1/abi/static/win_msvc2008_debug.lib").arg(prefix)
<< QString::fromLatin1("%1/abi/static/win-msvc2008-debug.lib").arg(prefix)
<< (QStringList() << QString::fromLatin1("x86-windows-unknown-pe-32bit"));
QTest::newRow("static QtCore: mac (debug)")
<< QString::fromLatin1("%1/abi/static/mac-32bit-debug.a").arg(prefix)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment