summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/darwin.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-04-03 14:31:41 +1100
committerChris Johns <chrisj@rtems.org>2013-04-03 14:31:41 +1100
commit0add2eaa706665552af694b9fbb75f42d37044b8 (patch)
treee2647e21c715c6e071387c114ad90f9638f73de0 /source-builder/sb/darwin.py
parentReport the exit code on a shell macro failure. (diff)
downloadrtems-source-builder-0add2eaa706665552af694b9fbb75f42d37044b8.tar.bz2
PR 2108, PR 2109. Add --jobs and --always-clean.
Refactor the options handling in defaults.py to allow the --jobs option have varing specific parameters. The option supports 'none', 'max' and 'half' or a fraction to divide the number of CPUs or an integer value which is the number of jobs. The --no-smp has been removed. The host specific modules have been changed to set the number of CPUs in the defaults table. Fixed the --keep-going to clean up is --always-clean is provided even if the build has an error.
Diffstat (limited to 'source-builder/sb/darwin.py')
-rw-r--r--source-builder/sb/darwin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/source-builder/sb/darwin.py b/source-builder/sb/darwin.py
index 5f8ac7f..4bfb635 100644
--- a/source-builder/sb/darwin.py
+++ b/source-builder/sb/darwin.py
@@ -33,10 +33,11 @@ def load():
e = execute.capture_execution()
exit_code, proc, output = e.shell(sysctl + 'hw.ncpu')
if exit_code == 0:
- smp_mflags = '-j' + output.split(' ')[1].strip()
+ ncpus = output.split(' ')[1].strip()
else:
- smp_mflags = ''
+ ncpus = '1'
defines = {
+ '_ncpus': ('none', 'none', ncpus),
'_os': ('none', 'none', 'darwin'),
'_host': ('triplet', 'required', uname[4] + '-apple-darwin' + uname[2]),
'_host_vendor': ('none', 'none', 'apple'),
@@ -48,7 +49,6 @@ def load():
'_var': ('dir', 'optional', '/usr/local/var'),
'_prefix': ('dir', 'optional', '%{_usr}'),
'optflags': ('none', 'none', '-O2'),
- '_smp_mflags': ('none', 'none', smp_mflags),
'__ldconfig': ('exe', 'none', ''),
'__xz': ('exe', 'required', '%{_usr}/bin/xz'),
'with_zlib': ('none', 'none', '--with-zlib=no')