summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorThomas Herz <thomas.herz@kuka.com>2015-05-06 22:48:03 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-07 18:10:21 (GMT)
commit20560e8dca47d7ff80d1a2d9b4e0cf952fa1a790 (patch)
treebe5922e77a1c7751dd80c636c58248493216c92a /Source/cmNinjaNormalTargetGenerator.cxx
parentb3de0dfe93af769ee7420cd1380395d656b4dac9 (diff)
downloadCMake-20560e8dca47d7ff80d1a2d9b4e0cf952fa1a790.zip
CMake-20560e8dca47d7ff80d1a2d9b4e0cf952fa1a790.tar.gz
CMake-20560e8dca47d7ff80d1a2d9b4e0cf952fa1a790.tar.bz2
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.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 155a30e..4c51d23 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -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 = "";
}