aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/corelib/buildgraph/rulecommands.cpp10
-rw-r--r--src/lib/corelib/buildgraph/rulecommands.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/rulecommands.cpp b/src/lib/corelib/buildgraph/rulecommands.cpp
index 6419d4e58..0044bdd5c 100644
--- a/src/lib/corelib/buildgraph/rulecommands.cpp
+++ b/src/lib/corelib/buildgraph/rulecommands.cpp
@@ -202,11 +202,19 @@ void ProcessCommand::setupForJavaScript(QScriptValue targetObject)
ProcessCommand::ProcessCommand()
: m_maxExitCode(0)
- , m_responseFileThreshold(HostOsInfo::isWindowsHost() ? 32000 : -1)
+ , m_responseFileThreshold(defaultResponseFileThreshold())
, m_responseFileArgumentIndex(0)
{
}
+int ProcessCommand::defaultResponseFileThreshold() const
+{
+ // TODO: Non-Windows platforms likely have their own limits. Investigate.
+ return HostOsInfo::isWindowsHost()
+ ? 31000 // 32000 minus "safety offset"
+ : -1;
+}
+
void ProcessCommand::getEnvironmentFromList(const QStringList &envList)
{
m_environment.clear();
diff --git a/src/lib/corelib/buildgraph/rulecommands.h b/src/lib/corelib/buildgraph/rulecommands.h
index 4e0d88056..57d73a623 100644
--- a/src/lib/corelib/buildgraph/rulecommands.h
+++ b/src/lib/corelib/buildgraph/rulecommands.h
@@ -129,6 +129,8 @@ public:
private:
ProcessCommand();
+ int defaultResponseFileThreshold() const;
+
void load(PersistentPool &pool);
void store(PersistentPool &pool) const;