Ninja: Do not use newlines in response files with Windows GNU tools (#15439)
Since commit v2.8.11~213^2 (Ninja: Avoid LNK1170 linker error, 2013-02-01) we generate linker response files with "$in_newline" to support a large number of object files with the MS link.exe tool. However, the GNU linker on Windows does not understand the newline endings that Ninja puts in the response files. Switch back to "$in" for that case.
This commit is contained in:
parent
b3de0dfe93
commit
20560e8dca
|
@ -202,7 +202,12 @@ cmNinjaNormalTargetGenerator
|
|||
responseFlag += rspfile;
|
||||
|
||||
// build response file content
|
||||
rspcontent = "$in_newline $LINK_PATH $LINK_LIBRARIES";
|
||||
if (this->GetGlobalGenerator()->IsGCCOnWindows()) {
|
||||
rspcontent = "$in";
|
||||
} else {
|
||||
rspcontent = "$in_newline";
|
||||
}
|
||||
rspcontent += " $LINK_PATH $LINK_LIBRARIES";
|
||||
vars.Objects = responseFlag.c_str();
|
||||
vars.LinkLibraries = "";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue