introduce QMAKE_LINK_O_FLAG
this makes it possible to properly parametrize alternative linkers. Change-Id: Ia9cf574544a0259975470366d278b6c5dc747906 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
b20d15b58b
commit
1c061b4bcc
@ -448,6 +448,9 @@ MakefileGenerator::init()
|
|||||||
if (chkglue.isEmpty()) // Backwards compat with Qt4 specs
|
if (chkglue.isEmpty()) // Backwards compat with Qt4 specs
|
||||||
chkglue = isWindowsShell() ? "" : "|| ";
|
chkglue = isWindowsShell() ? "" : "|| ";
|
||||||
|
|
||||||
|
if (v["QMAKE_LINK_O_FLAG"].isEmpty())
|
||||||
|
v["QMAKE_LINK_O_FLAG"].append("-o ");
|
||||||
|
|
||||||
ProStringList &quc = v["QMAKE_EXTRA_COMPILERS"];
|
ProStringList &quc = v["QMAKE_EXTRA_COMPILERS"];
|
||||||
|
|
||||||
//make sure the COMPILERS are in the correct input/output chain order
|
//make sure the COMPILERS are in the correct input/output chain order
|
||||||
|
@ -436,7 +436,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
|
t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
|
||||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||||
t << var("QMAKE_PRE_LINK") << "\n\t";
|
t << var("QMAKE_PRE_LINK") << "\n\t";
|
||||||
t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
|
t << "$(LINK) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
|
||||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||||
t << endl << endl;
|
t << endl << endl;
|
||||||
@ -451,7 +451,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||||
if (!project->isEmpty("QMAKE_PRE_LINK"))
|
if (!project->isEmpty("QMAKE_PRE_LINK"))
|
||||||
t << var("QMAKE_PRE_LINK") << "\n\t";
|
t << var("QMAKE_PRE_LINK") << "\n\t";
|
||||||
t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)";
|
t << "$(LINK) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)";
|
||||||
if (!project->isEmpty("QMAKE_POST_LINK"))
|
if (!project->isEmpty("QMAKE_POST_LINK"))
|
||||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||||
}
|
}
|
||||||
@ -503,7 +503,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t";
|
t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t";
|
||||||
if(!destdir.isEmpty())
|
if(!destdir.isEmpty())
|
||||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||||
t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir <<
|
t << "$(LINK) " << incr_lflags << " " << var("QMAKE_LINK_O_FLAG") << incr_target_dir <<
|
||||||
" $(INCREMENTAL_OBJECTS)" << endl;
|
" $(INCREMENTAL_OBJECTS)" << endl;
|
||||||
//communicated below
|
//communicated below
|
||||||
ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
|
ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD");
|
||||||
@ -1173,7 +1173,7 @@ void UnixMakefileGenerator::init2()
|
|||||||
}
|
}
|
||||||
if (project->values("QMAKE_LINK_SHLIB_CMD").isEmpty())
|
if (project->values("QMAKE_LINK_SHLIB_CMD").isEmpty())
|
||||||
project->values("QMAKE_LINK_SHLIB_CMD").append(
|
project->values("QMAKE_LINK_SHLIB_CMD").append(
|
||||||
"$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)");
|
"$(LINK) $(LFLAGS) " + project->first("QMAKE_LINK_O_FLAG") + "$(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)");
|
||||||
}
|
}
|
||||||
if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
|
if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
|
||||||
project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
|
project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
|
||||||
|
@ -405,7 +405,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
|||||||
t << "\n\t" << objectsLinkLine << " " ;
|
t << "\n\t" << objectsLinkLine << " " ;
|
||||||
}
|
}
|
||||||
} else if (project->first("TEMPLATE") != "aux") {
|
} else if (project->first("TEMPLATE") != "aux") {
|
||||||
t << "\n\t" << "$(LINKER) $(LFLAGS) -o $(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)";
|
t << "\n\t" << "$(LINKER) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)";
|
||||||
}
|
}
|
||||||
if(!project->isEmpty("QMAKE_POST_LINK"))
|
if(!project->isEmpty("QMAKE_POST_LINK"))
|
||||||
t << "\n\t" <<var("QMAKE_POST_LINK");
|
t << "\n\t" <<var("QMAKE_POST_LINK");
|
||||||
|
@ -276,6 +276,9 @@ void NmakeMakefileGenerator::init()
|
|||||||
project->values("QMAKE_LFLAGS").append("/VERSION:" + major + "." + minor);
|
project->values("QMAKE_LFLAGS").append("/VERSION:" + major + "." + minor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (project->isEmpty("QMAKE_LINK_O_FLAG"))
|
||||||
|
project->values("QMAKE_LINK_O_FLAG").append("/OUT:");
|
||||||
|
|
||||||
// Base class init!
|
// Base class init!
|
||||||
MakefileGenerator::init();
|
MakefileGenerator::init();
|
||||||
|
|
||||||
@ -377,7 +380,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
|||||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||||
t << "\n\t" <<var("QMAKE_PRE_LINK");
|
t << "\n\t" <<var("QMAKE_PRE_LINK");
|
||||||
if(project->isActiveConfig("staticlib")) {
|
if(project->isActiveConfig("staticlib")) {
|
||||||
t << "\n\t" << "$(LIBAPP) $(LIBFLAGS) /OUT:$(DESTDIR_TARGET) @<<" << "\n\t "
|
t << "\n\t" << "$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<" << "\n\t "
|
||||||
<< "$(OBJECTS)"
|
<< "$(OBJECTS)"
|
||||||
<< "\n<<";
|
<< "\n<<";
|
||||||
} else if (templateName != "aux") {
|
} else if (templateName != "aux") {
|
||||||
@ -459,7 +462,7 @@ void NmakeMakefileGenerator::writeLinkCommand(QTextStream &t, const QString &ext
|
|||||||
t << "$(LINKER) $(LFLAGS)";
|
t << "$(LINKER) $(LFLAGS)";
|
||||||
if (!extraFlags.isEmpty())
|
if (!extraFlags.isEmpty())
|
||||||
t << ' ' << extraFlags;
|
t << ' ' << extraFlags;
|
||||||
t << " /OUT:$(DESTDIR_TARGET) @<<\n"
|
t << " " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n"
|
||||||
<< "$(OBJECTS) $(LIBS)";
|
<< "$(OBJECTS) $(LIBS)";
|
||||||
if (!extraInlineFileContent.isEmpty())
|
if (!extraInlineFileContent.isEmpty())
|
||||||
t << ' ' << extraInlineFileContent;
|
t << ' ' << extraInlineFileContent;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user