Add command line length limit to Ninja generator

* If we don't do that, ninja will fail building WebKit because of a too
long command line
 * CMake will use a "response file" to forward arguments when the
command line gets over the limit (with a safety margin)
This commit is contained in:
Adrien Destugues
2013-10-14 10:06:53 +02:00
parent 5c0c10ac00
commit d50f282a65
2 changed files with 24 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ LICENSE="CMake"
COPYRIGHT="2002-2013 Kitware, Inc., Insight Consortium, All rights reserved."
SRC_URI="http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz"
CHECKSUM_MD5="6f5d7b8e7534a5d9e1a7664ba63cf882"
REVISION="1"
REVISION="2"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
PROVIDES="

View File

@@ -524,3 +524,26 @@ index fec142e..6adec1f 100644
--
1.8.3.4
From ff28e08e29c0d54d794185ada1ddf496b41285e0 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 14 Oct 2013 09:35:02 +0200
Subject: Enable command-line length limitation on Haiku.
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 7e48cd7..3d15900 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -563,7 +563,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmSystemTools::GetEnv(forceRspFile) == 0) {
#ifdef _WIN32
commandLineLengthLimit = 8000 - linkRuleLength;
-#elif defined(__linux) || defined(__APPLE__)
+#elif defined(__linux) || defined(__APPLE__) || defined(__HAIKU__)
// for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac
commandLineLengthLimit = ((int)sysconf(_SC_ARG_MAX))-linkRuleLength-1000;
#else
--
1.8.3.4