aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-build_toolchain_get__concurrent__links.py
blob: 5cf16130a4db58519d53fd6dfb0afc59da375e18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- build/toolchain/get_concurrent_links.py.orig	2021-08-17 00:15:54 UTC
+++ build/toolchain/get_concurrent_links.py
@@ -53,6 +53,11 @@ def _GetTotalMemoryInBytes():
       return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
     except Exception:
       return 0
+  elif sys.platform.startswith('freebsd'):
+    try:
+      return int(subprocess.check_output(['sysctl', '-n', 'hw.physmem']))
+    except Exception:
+      return 1
   # TODO(scottmg): Implement this for other platforms.
   return 0