mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
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.
This commit is contained in:
@@ -58,15 +58,12 @@ def load():
|
||||
pass
|
||||
|
||||
if os.environ.has_key('NUMBER_OF_PROCESSORS'):
|
||||
ncpus = int(os.environ['NUMBER_OF_PROCESSORS'])
|
||||
ncpus = os.environ['NUMBER_OF_PROCESSORS']
|
||||
else:
|
||||
ncpus = 0
|
||||
if ncpus > 1:
|
||||
smp_mflags = '-j' + str(ncpus)
|
||||
else:
|
||||
smp_mflags = ''
|
||||
ncpus = '1'
|
||||
|
||||
defines = {
|
||||
'_ncpus': ('none', 'none', ncpus),
|
||||
'_os': ('none', 'none', 'win32'),
|
||||
'_build': ('triplet', 'required', build_triple),
|
||||
'_host': ('triplet', 'required', host_triple),
|
||||
|
Reference in New Issue
Block a user