diff options
author | Thomas Herz <thomas.herz@kuka.com> | 2015-05-06 22:48:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-07 18:10:21 (GMT) |
commit | 20560e8dca47d7ff80d1a2d9b4e0cf952fa1a790 (patch) | |
tree | be5922e77a1c7751dd80c636c58248493216c92a | |
parent | b3de0dfe93af769ee7420cd1380395d656b4dac9 (diff) | |
download | CMake-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.
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 7 |
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 = ""; } |