mirror of
https://git.freebsd.org/ports.git
synced 2025-06-19 03:30:32 -04:00
- Make existing patches apply cleanly Changelog: https://chromium.googlesource.com/chromium/src/+log/72.0.3626.121..73.0.3683.86?pretty=fuller&n=10000 Submitted by: Matthias Wolf MFH: 2019Q2
17 lines
705 B
Python
17 lines
705 B
Python
--- build/toolchain/get_concurrent_links.py.orig 2019-03-11 22:00:52 UTC
|
|
+++ build/toolchain/get_concurrent_links.py
|
|
@@ -46,6 +46,14 @@ 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
|
|
+ except Exception:
|
|
+ return 1
|
|
# TODO(scottmg): Implement this for other platforms.
|
|
return 0
|
|
|