Bug 872856 - Temporarily increase Python recursion limit in pymake; r=ted
authorGregory Szorc <gps@mozilla.com>
Mon, 20 May 2013 14:07:15 -0700
changeset 132460 aaf004a8213201fadf5242f12fde18506bd0a862
parent 132459 7183748586f176996a97458ffef43ea6641be267
child 132461 e1562df7e17ba8417cc2bdb6e3a1ea1a2d24f9d0
push id24705
push userryanvm@gmail.com
push dateTue, 21 May 2013 17:24:33 +0000
treeherdermozilla-central@97f49d0b228c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs872856
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 872856 - Temporarily increase Python recursion limit in pymake; r=ted
build/pymake/make.py
--- a/build/pymake/make.py
+++ b/build/pymake/make.py
@@ -12,11 +12,18 @@ import pymake.command, pymake.process
 import gc
 
 if __name__ == '__main__':
   sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
   sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)
 
   gc.disable()
 
+  # This is meant as a temporary workaround until issues with many targets
+  # and prerequisites is addressed. Bug 874210 tracks.
+  try:
+      sys.setrecursionlimit(2 * sys.getrecursionlimit())
+  except Exception:
+      print >>sys.stderr, 'Unable to increase Python recursion limit.'
+
   pymake.command.main(sys.argv[1:], os.environ, os.getcwd(), cb=sys.exit)
   pymake.process.ParallelContext.spin()
   assert False, "Not reached"