diff options
Diffstat (limited to 'qmake/generators/win32/mingw_make.cpp')
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 0936d15..5685d6b 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -371,7 +371,12 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t) ar_script_file += "." + var("BUILD_NAME"); } createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS")); - objectsLinkLine = "ar -M < " + ar_script_file; + // QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix. + // Strip off any options since the ar commands will be read from file. + QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);; + if (ar_cmd.isEmpty()) + ar_cmd = "ar"; + objectsLinkLine = ar_cmd + " -M < " + ar_script_file; } else { QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET"); if (!var("BUILD_NAME").isEmpty()) { |