Differential D38165 Diff 118368 www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_build_toolchain_get__concurrent__links.py
--- src/3rdparty/chromium/build/toolchain/get_concurrent_links.py.orig 2018-11-13 18:25:11 UTC | --- src/3rdparty/chromium/build/toolchain/get_concurrent_links.py.orig 2021-12-15 16:12:54 UTC | ||||
+++ src/3rdparty/chromium/build/toolchain/get_concurrent_links.py | +++ src/3rdparty/chromium/build/toolchain/get_concurrent_links.py | ||||
@@ -46,6 +46,14 @@ def _GetTotalMemoryInBytes(): | @@ -53,6 +53,14 @@ def _GetTotalMemoryInBytes(): | ||||
return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize'])) | return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize'])) | ||||
except Exception: | except Exception: | ||||
return 0 | return 0 | ||||
+ elif sys.platform.startswith('freebsd'): | + elif sys.platform.startswith('freebsd'): | ||||
+ try: | + try: | ||||
+ avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.physmem'])) | + 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 | + # With -fuse-lld it doesn't take a lot of ram, feel free to change that | ||||
+ # 1 * ... to needed amount | + # 1 * ... to needed amount | ||||
+ return max(1, avail_bytes / (1 * (2 ** 30))) # total / 4GB | + return max(1, avail_bytes / (1 * (2 ** 30))) # total / 4GB | ||||
+ except Exception: | + except Exception: | ||||
+ return 1 | + return 1 | ||||
# TODO(scottmg): Implement this for other platforms. | # TODO(scottmg): Implement this for other platforms. | ||||
return 0 | return 0 | ||||