Currently we always disable parallel gyp execution when running gyp
inside of GBS. This done because on some targets (TV 2.2.1) parallel
excution does not work due to broken python multiprocessing support.
The problem is, parallel execution works fine on Mobile or TV 3.0 and
disabling it meks gyp runs longer than necessary.
This patch uses an alternative solution. Only disable parallel gyp mode
in case gyp run in parallel such mode. I've tested it on both Mobile 2.4
and TV 2.2.1 targets and both work fine with such solution. The
difference is, Mobile 2.4 gyp run is now faster than previously.
Reviewed by: Antonio Gomes, Kamil Klimek, Piotr Grad, SeungSeop Park
Change-Id: Iff360c20b30435dd96255b393057ea3acfa9fa95
Signed-off-by: Piotr Tworek <p.tworek@samsung.com>
args.extend(['--format=ninja'])
args.append("--check")
- # gyp on gbs fails with multiprocessing.SemLock() not implemented
- # disabling parallel gyp for gbs
- gbs_build = os.environ.get('BUILDING_WITH_GBS')
- if gbs_build:
- args.append("--no-parallel")
-
# TODO(b.kelemen): remove the condition once gyp_trunk.py has landed.
if os.path.exists(os.path.join(script_dir, 'gyp_trunk.py')):
# gyp_trunk works on sys.argv so we merge |args| back.
print 'Updating projects from gyp files...'
+ try:
+ sys.exit(gyp.main(args))
+ except ImportError:
+ print ("Multiprocessing supported seems broken, disabling parallel gyp execution")
+ args.append("--no-parallel")
- # Off we go...
sys.exit(gyp.main(args))
ADDITIONAL_GYP_PARAMETERS+="-Dtarget_arch=$host_arch
-Dhost_arch=$host_arch
-Dsysroot=
- --no-parallel
"
# TODO(b.kelemen): ideally crosscompile should also support system libs.
# Unfortunately the gbs root doesn't contain everything chromium needs.