[gn] Add pool for dsymutil
dsymutil seems to kill the machine when too many processes are run in
parallel, so we need to use a pool to limit the concurrency when
passing large -j to Ninja (e.g. Goma build).
Change-Id: I84404291db4781f86268256ab888cef8d07c770e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234477
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
diff --git a/gn/toolchain/num_cpus.py b/gn/toolchain/num_cpus.py
new file mode 100644
index 0000000..a2a8566
--- /dev/null
+++ b/gn/toolchain/num_cpus.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+#
+# Copyright 2019 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import multiprocessing
+
+print multiprocessing.cpu_count()