()
| 60 | # Check physical memory and if we are on a reasonable non small SOC machine |
| 61 | # with more than 4GB, use all the CPUs, otherwisxe only 1. |
| 62 | def get_build_cpus(): |
| 63 | physical_bytes = os.sysconf('SC_PAGESIZE') * os.sysconf('SC_PHYS_PAGES') |
| 64 | if physical_bytes < (1<<30) * 4: |
| 65 | return 1 |
| 66 | else: |
| 67 | return multiprocessing.cpu_count() |
| 68 | |
| 69 | |
| 70 | def make_args(target='', quiet=True): |