summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-15 13:37:03 (GMT)
committerBrad King <brad.king@kitware.com>2016-07-15 13:43:02 (GMT)
commit86dd2427bcb7cd1d912fc802f70b15556e776d62 (patch)
tree80cef28d855b38d42ba8bdb56cd377cd0e3c7a9f /Source/cmNinjaNormalTargetGenerator.cxx
parente31084e65745f9dd422c6aff0a2ed4ada6918805 (diff)
downloadCMake-86dd2427bcb7cd1d912fc802f70b15556e776d62.zip
CMake-86dd2427bcb7cd1d912fc802f70b15556e776d62.tar.gz
CMake-86dd2427bcb7cd1d912fc802f70b15556e776d62.tar.bz2
Ninja: Do not force response files when no sysconf(3) limit is used
Commit v3.6.0-rc1~174^2~1 (cmGlobalNinjaGenerator: Clarify logic for forcing use of response files, 2016-04-06) started using negative command line length values to represent forced use of response files but forgot to update `calculateCommandLineLengthLimit()` accordingly. Teach it to return `0` instead of `-1` when no limit is computed from the system to avoid forcing response files. Reported-by: Raphael Kubo da Costa <rakuco@FreeBSD.org>
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3e91545..1386a04 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -354,7 +354,7 @@ static int calculateCommandLineLengthLimit(int linkRuleLength)
size_t const arrSz = cmArraySize(limits);
int const sz = *std::min_element(limits, limits + arrSz);
if (sz == std::numeric_limits<int>::max()) {
- return -1;
+ return 0;
}
return sz - linkRuleLength;