myZipFile.close()
return rsrc_zip
- def build_native(self, source, rootstrap=None, arch=None, conf='Debug'):
+ def build_native(self, source, rootstrap=None, arch=None, conf='Debug', jobs=None):
"""SDK CLI build command"""
_rootstrap = self.check_rootstrap(rootstrap)
elif arch == 'arm': rootstrap = rootstrap.replace('emulator', 'device')
for x in source.project_list:
- out = self._run('build-native', ['-r', rootstrap, '-a', self.arch, '-C', conf, '-c', 'gcc', '--' , x['path']], checker=True)
+ b_args = ['-r', rootstrap, '-a', self.arch, '-C', conf, '-c', 'gcc']
+ if jobs is not None: b_args.extend(['-j', jobs])
+ b_args.extend(['--', x['path']])
+ out = self._run('build-native', b_args, checker=True)
logpath = os.path.join(source.output_dir, \
'build_%s_%s' % (rootstrap, os.path.basename(x['path'])))
if not os.path.isdir(source.output_dir):
help='(ex, ABS) Certificate profile name')
build.add_argument('-c', '--conf', action='store',default='Release', dest='conf', \
help='(ex, Debug|Release) Build Configuration')
+ build.add_argument('-j', '--jobs', action='store', dest='jobs', \
+ help='(number of jobs) The number of parallel builds')
build.add_argument('--sdkpath', action='store', dest='sdkpath', \
help='Specify Tizen SDK installation root (one time init).' \
' ex) /home/yours/tizen-sdk/')
my_source = Source(src=args.workspace)
my_sdk = Sdk(sdkpath=args.sdkpath)
my_sdk.clean(my_source)
- my_sdk.build_native(my_source, rootstrap=args.rootstrap, arch=args.arch, conf=args.conf)
+ my_sdk.build_native(my_source, rootstrap=args.rootstrap, arch=args.arch, conf=args.conf, jobs=args.jobs)
if args.conf == 'Debug' :
my_sdk.package_new(my_source, pkg_type=args.type, cert=args.cert, conf=args.conf)
my_sdk.package_new(my_source, pkg_type=args.type, cert=args.cert, conf=args.conf, manual_strip=True)