# HG changeset patch # User Doug Simon # Date 1395179430 -3600 # Node ID 591f4a575ebf91de8fb74a5eb6fbc645a0997468 # Parent e845cd0b033f71bd877355c29bfff055eec8e76b issue warning/error where ever relevant if a non-supported VM (e.g., client VM on Mac) is used in mx diff -r e845cd0b033f -r 591f4a575ebf mx/mx_graal.py --- a/mx/mx_graal.py Tue Mar 18 20:36:53 2014 +0100 +++ b/mx/mx_graal.py Tue Mar 18 22:50:30 2014 +0100 @@ -83,6 +83,12 @@ JDK_UNIX_PERMISSIONS = 0755 +def isVMSupported(vm): + if 'client' in vm and len(platform.mac_ver()[0]) != 0: + # Client VM not supported: java launcher on Mac OS X translates '-client' to '-server' + return False + return True + def _get_vm(): """ Gets the configured VM, presenting a dialogue if there is no currently configured VM. @@ -568,6 +574,10 @@ if build != 'product': mx.log('only product build of original VM exists') continue + + if not isVMSupported(vm): + mx.log('The ' + vm + ' VM is not supported on this platform - skipping') + continue vmDir = join(_vmLibDirInJdk(jdk), vm) if not exists(vmDir): @@ -718,8 +728,8 @@ if vm is None: vm = _get_vm() - if 'client' in vm and len(platform.mac_ver()[0]) != 0: - mx.abort("Client VM not supported: java launcher on Mac OS X translates '-client' to '-server'") + if not isVMSupported(vm): + mx.abort('The ' + vm + ' is not supported on this platform') if cwd is None: cwd = _vm_cwd @@ -927,6 +937,10 @@ allStart = time.time() for v in vms: + if not isVMSupported(v): + mx.log('The ' + v + ' VM is not supported on this platform - skipping') + continue + for vmbuild in builds: if v == 'original' and vmbuild != 'product': continue @@ -1043,6 +1057,9 @@ for vmbuild in ['product', 'fastdebug']: for theVm in ['client', 'server']: + if not isVMSupported(vm): + mx.log('The' + vm + ' VM is not supported on this platform') + continue with VM(theVm, vmbuild): t = Task('DaCapo_pmd:' + theVm + ':' + vmbuild) dacapo(['pmd'])