Mercurial > hg > truffle
comparison mx/mx_graal.py @ 14619:ed3bfe43d772
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 19 Mar 2014 21:10:34 +0100 |
parents | f50dece27798 |
children | af7b9b9a9a28 |
comparison
equal
deleted
inserted
replaced
14618:affd2b3b0cbb | 14619:ed3bfe43d772 |
---|---|
80 _make_eclipse_launch = False | 80 _make_eclipse_launch = False |
81 | 81 |
82 _minVersion = mx.VersionSpec('1.7.0_04') | 82 _minVersion = mx.VersionSpec('1.7.0_04') |
83 | 83 |
84 JDK_UNIX_PERMISSIONS = 0755 | 84 JDK_UNIX_PERMISSIONS = 0755 |
85 | |
86 def isVMSupported(vm): | |
87 if 'client' in vm and len(platform.mac_ver()[0]) != 0: | |
88 # Client VM not supported: java launcher on Mac OS X translates '-client' to '-server' | |
89 return False | |
90 return True | |
85 | 91 |
86 def _get_vm(): | 92 def _get_vm(): |
87 """ | 93 """ |
88 Gets the configured VM, presenting a dialogue if there is no currently configured VM. | 94 Gets the configured VM, presenting a dialogue if there is no currently configured VM. |
89 """ | 95 """ |
565 jdk = _jdk(build, create=True) | 571 jdk = _jdk(build, create=True) |
566 | 572 |
567 if vm == 'original': | 573 if vm == 'original': |
568 if build != 'product': | 574 if build != 'product': |
569 mx.log('only product build of original VM exists') | 575 mx.log('only product build of original VM exists') |
576 continue | |
577 | |
578 if not isVMSupported(vm): | |
579 mx.log('The ' + vm + ' VM is not supported on this platform - skipping') | |
570 continue | 580 continue |
571 | 581 |
572 vmDir = join(_vmLibDirInJdk(jdk), vm) | 582 vmDir = join(_vmLibDirInJdk(jdk), vm) |
573 if not exists(vmDir): | 583 if not exists(vmDir): |
574 if mx.get_os() != 'windows': | 584 if mx.get_os() != 'windows': |
716 """run the VM selected by the '--vm' option""" | 726 """run the VM selected by the '--vm' option""" |
717 | 727 |
718 if vm is None: | 728 if vm is None: |
719 vm = _get_vm() | 729 vm = _get_vm() |
720 | 730 |
721 if 'client' in vm and len(platform.mac_ver()[0]) != 0: | 731 if not isVMSupported(vm): |
722 mx.abort("Client VM not supported: java launcher on Mac OS X translates '-client' to '-server'") | 732 mx.abort('The ' + vm + ' is not supported on this platform') |
723 | 733 |
724 if cwd is None: | 734 if cwd is None: |
725 cwd = _vm_cwd | 735 cwd = _vm_cwd |
726 elif _vm_cwd is not None and _vm_cwd != cwd: | 736 elif _vm_cwd is not None and _vm_cwd != cwd: |
727 mx.abort("conflicting working directories: do not set --vmcwd for this command") | 737 mx.abort("conflicting working directories: do not set --vmcwd for this command") |
925 vms = args.vms.split(',') | 935 vms = args.vms.split(',') |
926 builds = args.builds.split(',') | 936 builds = args.builds.split(',') |
927 | 937 |
928 allStart = time.time() | 938 allStart = time.time() |
929 for v in vms: | 939 for v in vms: |
940 if not isVMSupported(v): | |
941 mx.log('The ' + v + ' VM is not supported on this platform - skipping') | |
942 continue | |
943 | |
930 for vmbuild in builds: | 944 for vmbuild in builds: |
931 if v == 'original' and vmbuild != 'product': | 945 if v == 'original' and vmbuild != 'product': |
932 continue | 946 continue |
933 if not args.console: | 947 if not args.console: |
934 logFile = join(v + '-' + vmbuild + '.log') | 948 logFile = join(v + '-' + vmbuild + '.log') |
1041 buildvms(['--vms', 'server-nograal', '--builds', 'optimized']) | 1055 buildvms(['--vms', 'server-nograal', '--builds', 'optimized']) |
1042 tasks.append(t.stop()) | 1056 tasks.append(t.stop()) |
1043 | 1057 |
1044 for vmbuild in ['product', 'fastdebug']: | 1058 for vmbuild in ['product', 'fastdebug']: |
1045 for theVm in ['client', 'server']: | 1059 for theVm in ['client', 'server']: |
1060 if not isVMSupported(theVm): | |
1061 mx.log('The' + theVm + ' VM is not supported on this platform') | |
1062 continue | |
1046 with VM(theVm, vmbuild): | 1063 with VM(theVm, vmbuild): |
1047 t = Task('DaCapo_pmd:' + theVm + ':' + vmbuild) | 1064 t = Task('DaCapo_pmd:' + theVm + ':' + vmbuild) |
1048 dacapo(['pmd']) | 1065 dacapo(['pmd']) |
1049 tasks.append(t.stop()) | 1066 tasks.append(t.stop()) |
1050 | 1067 |