don't enable parallel builds with older versions of rake

At least rake 10.1.x has a bug in that it runs all jobs in parallel
disregarding the maximum number of jobs causing massive memory usage,
hence swap usage.
This commit is contained in:
Moritz Bunkus 2017-10-17 20:44:16 +02:00
parent 2c48e2a290
commit e29c20aacd

View File

@ -26,7 +26,7 @@ end
# For newer rake turn on parallel processing, too. Newer rake versions
# use an OpenStruct, though, so testing with responds_to? won't work.
version = Rake::VERSION.gsub(%r{[^0-9\.]+}, "").split(%r{\.}).map(&:to_i)
if (version[0] > 10) || ((version[0] == 10) && (version[1] >= 1))
if (version[0] > 10) || ((version[0] == 10) && (version[1] >= 3))
Rake.application.options.always_multitask = true
end