Pārlūkot izejas kodu

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 <[email protected]>
Brad King 9 gadi atpakaļ
vecāks
revīzija
86dd2427bc
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Source/cmNinjaNormalTargetGenerator.cxx

+ 1 - 1
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;