Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
fcf82b74
Commit
fcf82b74
authored
May 06, 2011
by
Tobias Hunger
Browse files
Fix ABI detection of static mingw libraries on windows
Task-number: QTCREATORBUG-4771
parent
4d113c9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/abi.cpp
View file @
fcf82b74
...
...
@@ -524,8 +524,6 @@ QList<Abi> Abi::abisOfBinary(const QString &path)
if
(
!
f
.
exists
())
return
tmp
;
bool
windowsStatic
=
path
.
endsWith
(
QLatin1String
(
".lib"
));
f
.
open
(
QFile
::
ReadOnly
);
QByteArray
data
=
f
.
read
(
1024
);
if
(
data
.
size
()
>=
67
...
...
@@ -552,12 +550,11 @@ QList<Abi> Abi::abisOfBinary(const QString &path)
int
toSkip
=
60
+
fileNameOffset
;
offset
+=
fileLength
.
toInt
()
+
60
/* header */
;
if
(
windowsStatic
)
{
if
(
fileName
==
QLatin1String
(
"/0 "
))
tmp
=
parseCoffHeader
(
data
.
mid
(
toSkip
,
20
));
}
else
{
tmp
.
append
(
abiOf
(
data
.
mid
(
toSkip
)));
}
tmp
.
append
(
abiOf
(
data
.
mid
(
toSkip
)));
if
(
tmp
.
isEmpty
()
&&
fileName
==
QLatin1String
(
"/0 "
))
tmp
=
parseCoffHeader
(
data
.
mid
(
toSkip
,
20
));
// This might be windws...
if
(
!
tmp
.
isEmpty
()
&&
tmp
.
at
(
0
).
binaryFormat
()
!=
Abi
::
MachOFormat
)
break
;
...
...
@@ -624,6 +621,9 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary_data()
QTest
::
newRow
(
"static QtCore: win msvc2008 (debug)"
)
<<
QString
::
fromLatin1
(
"%1/abi/static/win-msvc2008-debug.lib"
).
arg
(
prefix
)
<<
(
QStringList
()
<<
QString
::
fromLatin1
(
"x86-windows-unknown-pe-32bit"
));
QTest
::
newRow
(
"static QtCore: win mingw"
)
<<
QString
::
fromLatin1
(
"%1/abi/static/win-mingw.a"
).
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
)
<<
(
QStringList
()
<<
QString
::
fromLatin1
(
"x86-macos-generic-mach_o-32bit"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment