diff options
Diffstat (limited to 'www/chromium/files/patch-build_toolchain_get__concurrent__links.py')
-rw-r--r-- | www/chromium/files/patch-build_toolchain_get__concurrent__links.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/www/chromium/files/patch-build_toolchain_get__concurrent__links.py b/www/chromium/files/patch-build_toolchain_get__concurrent__links.py index 991cf22f96c3..5cf16130a4db 100644 --- a/www/chromium/files/patch-build_toolchain_get__concurrent__links.py +++ b/www/chromium/files/patch-build_toolchain_get__concurrent__links.py @@ -1,15 +1,12 @@ ---- build/toolchain/get_concurrent_links.py.orig 2021-04-14 18:40:48 UTC +--- build/toolchain/get_concurrent_links.py.orig 2021-08-17 00:15:54 UTC +++ build/toolchain/get_concurrent_links.py -@@ -53,6 +53,14 @@ def _GetTotalMemoryInBytes(): +@@ -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: -+ avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.physmem'])) -+ # With -fuse-lld it doesn't take a lot of ram, feel free to change that -+ # 1 * ... to needed amount -+ return max(1, avail_bytes / (1 * (2 ** 30))) # total / 4GB ++ return int(subprocess.check_output(['sysctl', '-n', 'hw.physmem'])) + except Exception: + return 1 # TODO(scottmg): Implement this for other platforms. |