Support QMAKE_PRE_LINK and QMAKE_POST_LINK for static libs on unix
prelink was not supported at all for ar. postlink was done for most cases, but missing in one particular ar invocation. Task-number: QTBUG-57276 Change-Id: Ic72c42a9502c97d7111b3f3941b387024d46a27d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
d9203fa534
commit
fa6444939c
@ -658,11 +658,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "$(TARGETA): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP)";
|
||||
if(do_incremental)
|
||||
t << " $(INCREMENTAL_OBJECTS)";
|
||||
t << ' ' << depVar("POST_TARGETDEPS") << "\n\t"
|
||||
<< "-$(DEL_FILE) $(TARGETA) \n\t"
|
||||
t << ' ' << depVar("POST_TARGETDEPS") << "\n\t";
|
||||
if (!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << var("QMAKE_PRE_LINK") << "\n\t";
|
||||
t << "-$(DEL_FILE) $(TARGETA) \n\t"
|
||||
<< var("QMAKE_AR_CMD");
|
||||
if(do_incremental)
|
||||
t << " $(INCREMENTAL_OBJECTS)";
|
||||
if (!project->isEmpty("QMAKE_POST_LINK"))
|
||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||
if(!project->isEmpty("QMAKE_RANLIB"))
|
||||
t << "\n\t$(RANLIB) $(TARGETA)";
|
||||
t << endl << endl;
|
||||
@ -679,6 +683,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< " $(OBJECTS) $(OBJCOMP) " << depVar("POST_TARGETDEPS") << "\n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
if (!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << var("QMAKE_PRE_LINK") << "\n\t";
|
||||
t << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
|
||||
<< var("QMAKE_AR_CMD") << "\n";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
@ -709,6 +715,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
}
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
if (!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << var("QMAKE_PRE_LINK") << "\n\t";
|
||||
t << "-$(DEL_FILE) " << lib << "\n\t"
|
||||
<< ar << "\n";
|
||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user