comparison mx/mx_graal.py @ 16875:73d994651fcd

fixed regression when building original VM without a Java build beforehand
author Doug Simon <doug.simon@oracle.com>
date Thu, 21 Aug 2014 12:01:35 +0200
parents 0d2e3399acfe
children 6adb14d2320c
comparison
equal deleted inserted replaced
16874:3044a847fe91 16875:73d994651fcd
457 if _installed_jdks: 457 if _installed_jdks:
458 mx.log("The selected JDK directory does not (yet) exist: " + jdk) 458 mx.log("The selected JDK directory does not (yet) exist: " + jdk)
459 _handle_missing_VM(build, vmToCheck if vmToCheck else 'graal') 459 _handle_missing_VM(build, vmToCheck if vmToCheck else 'graal')
460 460
461 if installJars: 461 if installJars:
462 _installDistInJdks(mx.distribution('GRAAL')) 462 def _installDistInJdksIfExists(dist):
463 _installDistInJdks(mx.distribution('GRAAL_LOADER')) 463 if exists(dist.path):
464 _installDistInJdks(mx.distribution('TRUFFLE')) 464 _installDistInJdks(dist)
465 _installDistInJdks(mx.distribution('GRAAL_TRUFFLE')) 465
466 _installDistInJdksIfExists(mx.distribution('GRAAL'))
467 _installDistInJdksIfExists(mx.distribution('GRAAL_LOADER'))
468 _installDistInJdksIfExists(mx.distribution('TRUFFLE'))
469 _installDistInJdksIfExists(mx.distribution('GRAAL_TRUFFLE'))
466 470
467 if vmToCheck is not None: 471 if vmToCheck is not None:
468 jvmCfg = _vmCfgInJdk(jdk) 472 jvmCfg = _vmCfgInJdk(jdk)
469 found = False 473 found = False
470 with open(jvmCfg) as f: 474 with open(jvmCfg) as f:
768 if build == 'ide-build-target': 772 if build == 'ide-build-target':
769 build = os.environ.get('IDE_BUILD_TARGET', None) 773 build = os.environ.get('IDE_BUILD_TARGET', None)
770 if build is None or len(build) == 0: 774 if build is None or len(build) == 0:
771 continue 775 continue
772 776
773 jdk = _jdk(build, create=True, installJars=not opts2.java) 777 jdk = _jdk(build, create=True, installJars=vm != 'original' and not opts2.java)
774 778
775 if vm == 'original': 779 if vm == 'original':
776 if build != 'product': 780 if build != 'product':
777 mx.log('only product build of original VM exists') 781 mx.log('only product build of original VM exists')
778 continue 782 continue