[CMake] Only force response files for Ninja with CMake < 3.2 on Linux
Created attachment 312195 [details] Patch
CMake uses response files when needed, but the limit was wrong on Linux (https://cmake.org/Bug/view.php?id=14892, fixed in CMake 3.2). It created the original https://bugs.webkit.org/show_bug.cgi?id=129771, with "argument list too long" errors. CMake 3.6 added response file support for compile rules (which created https://bugs.webkit.org/show_bug.cgi?id=168770 since we forced the response files). On Linux, CMake >= 3.2 uses response files as needed (ie only for libWebCore.a). Hopefully platforms which don't support response files (FreeBSD, Apple) have a big enough command line length limit (sysconf(_SC_ARG_MAX)) to avoid them.
Comment on attachment 312195 [details] Patch Thanks, let's try it! I only wonder if we still need the conditionals to force disable response files when using icecc. Carlos Lopez, Tom, what do you think?
(In reply to Michael Catanzaro from comment #3) > Comment on attachment 312195 [details] > Patch > > Thanks, let's try it! I only wonder if we still need the conditionals to > force disable response files when using icecc. Carlos Lopez, Tom, what do > you think? The icecc test was only disabling CMAKE_NINJA_FORCE_RESPONSE_FILE for CMake > 3.5, older versions only support response files to link or create archives. The archives are done locally with ar, and for the link icecc probably forwards all arguments to the local CXX.
Comment on attachment 312195 [details] Patch I'm not sure I understand, but let's try it!
Ah well yeah, I must have misread the conditionals... clearly this shouldn't affect icecc at all (unless using old CMake).
Comment on attachment 312195 [details] Patch Clearing flags on attachment: 312195 Committed r217894: <http://trac.webkit.org/changeset/217894>
All reviewed patches have been landed. Closing bug.