Mercurial > hg > graal-jvmci-8
comparison mx/commands.py @ 9117:cbfcb1054619
renamed 'boot' VM to 'original' VM
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 15 Apr 2013 14:27:37 +0200 |
parents | e2dae636732a |
children | 35e31499ae9e |
comparison
equal
deleted
inserted
replaced
9116:e2dae636732a | 9117:cbfcb1054619 |
---|---|
37 | 37 |
38 """ Used to distinguish an exported GraalVM (see 'mx export'). """ | 38 """ Used to distinguish an exported GraalVM (see 'mx export'). """ |
39 _vmSourcesAvailable = exists(join(_graal_home, 'make')) and exists(join(_graal_home, 'src')) | 39 _vmSourcesAvailable = exists(join(_graal_home, 'make')) and exists(join(_graal_home, 'src')) |
40 | 40 |
41 """ The VMs that can be built and run - default is first in list """ | 41 """ The VMs that can be built and run - default is first in list """ |
42 _vmChoices = ['graal', 'server', 'client', 'server-nograal', 'client-nograal', 'boot'] | 42 _vmChoices = ['graal', 'server', 'client', 'server-nograal', 'client-nograal', 'original'] |
43 | 43 |
44 """ The VM that will be run by the 'vm' command and built by default by the 'build' command. | 44 """ The VM that will be run by the 'vm' command and built by default by the 'build' command. |
45 This can be set via the global '--vm' option. """ | 45 This can be set via the global '--vm' option. """ |
46 _vm = _vmChoices[0] | 46 _vm = _vmChoices[0] |
47 | 47 |
337 if line.startswith('-') and defaultVM is None: | 337 if line.startswith('-') and defaultVM is None: |
338 parts = line.split() | 338 parts = line.split() |
339 assert len(parts) == 2, parts | 339 assert len(parts) == 2, parts |
340 assert parts[1] == 'KNOWN', parts[1] | 340 assert parts[1] == 'KNOWN', parts[1] |
341 defaultVM = parts[0][1:] | 341 defaultVM = parts[0][1:] |
342 jvmCfgLines += ['# boot VM is a copy of the unmodified ' + defaultVM + ' VM\n'] | 342 jvmCfgLines += ['# default VM is a copy of the unmodified ' + defaultVM + ' VM\n'] |
343 jvmCfgLines += ['-boot KNOWN\n'] | 343 jvmCfgLines += ['-original KNOWN\n'] |
344 else: | 344 else: |
345 jvmCfgLines += [line] | 345 jvmCfgLines += [line] |
346 | 346 |
347 assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg | 347 assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg |
348 if mx.get_os() != 'windows': | 348 if mx.get_os() != 'windows': |
349 chmodRecursive(jdk, 0755) | 349 chmodRecursive(jdk, 0755) |
350 shutil.move(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), 'boot')) | 350 shutil.move(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), 'original')) |
351 | 351 |
352 | 352 |
353 with open(jvmCfg, 'w') as fp: | 353 with open(jvmCfg, 'w') as fp: |
354 for line in jvmCfgLines: | 354 for line in jvmCfgLines: |
355 fp.write(line) | 355 fp.write(line) |
569 builds = ['product'] | 569 builds = ['product'] |
570 | 570 |
571 if vm is None: | 571 if vm is None: |
572 vm = _vm | 572 vm = _vm |
573 | 573 |
574 if vm.startswith('server') or vm == 'boot': | 574 if vm == 'original': |
575 pass | |
576 elif vm.startswith('server'): | |
575 buildSuffix = '' | 577 buildSuffix = '' |
576 elif vm.startswith('client'): | 578 elif vm.startswith('client'): |
577 buildSuffix = '1' | 579 buildSuffix = '1' |
578 else: | 580 else: |
579 assert vm == 'graal', vm | 581 assert vm == 'graal', vm |
588 mx.log('[skipping build from IDE as IDE_BUILD_TARGET environment variable is ""]') | 590 mx.log('[skipping build from IDE as IDE_BUILD_TARGET environment variable is ""]') |
589 continue | 591 continue |
590 | 592 |
591 jdk = _jdk(build, create=True) | 593 jdk = _jdk(build, create=True) |
592 | 594 |
593 if vm == 'boot': | 595 if vm == 'original': |
594 if build != 'product': | 596 if build != 'product': |
595 mx.log('only product build of boot VM exists') | 597 mx.log('only product build of original VM exists') |
596 continue | 598 continue |
597 | 599 |
598 vmDir = join(_vmLibDirInJdk(jdk), vm) | 600 vmDir = join(_vmLibDirInJdk(jdk), vm) |
599 if not exists(vmDir): | 601 if not exists(vmDir): |
600 if mx.get_os() != 'windows': | 602 if mx.get_os() != 'windows': |
822 (_, testfile) = tempfile.mkstemp(".testclasses", "graal") | 824 (_, testfile) = tempfile.mkstemp(".testclasses", "graal") |
823 | 825 |
824 def harness(projectscp, vmArgs): | 826 def harness(projectscp, vmArgs): |
825 if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): | 827 if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): |
826 subprocess.check_call([mx.java().javac, '-cp', projectscp, '-d', mxdir, javaSource]) | 828 subprocess.check_call([mx.java().javac, '-cp', projectscp, '-d', mxdir, javaSource]) |
827 if _vm == 'boot' or _vm.endswith('nograal'): | 829 if _vm == 'original' or _vm.endswith('nograal'): |
828 prefixArgs = ['-esa', '-ea'] | 830 prefixArgs = ['-esa', '-ea'] |
829 else: | 831 else: |
830 prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] | 832 prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] |
831 vm(prefixArgs + vmArgs + ['-cp', projectscp + os.pathsep + mxdir, name] + [testfile]) | 833 vm(prefixArgs + vmArgs + ['-cp', projectscp + os.pathsep + mxdir, name] + [testfile]) |
832 | 834 |
880 builds = args.builds.split(',') | 882 builds = args.builds.split(',') |
881 | 883 |
882 allStart = time.time() | 884 allStart = time.time() |
883 for v in vms: | 885 for v in vms: |
884 for vmbuild in builds: | 886 for vmbuild in builds: |
885 if v == 'boot' and vmbuild != 'product': | 887 if v == 'original' and vmbuild != 'product': |
886 continue | 888 continue |
887 if not args.console: | 889 if not args.console: |
888 logFile = join(v + '-' + vmbuild + '.log') | 890 logFile = join(v + '-' + vmbuild + '.log') |
889 log = open(join(_graal_home, logFile), 'wb') | 891 log = open(join(_graal_home, logFile), 'wb') |
890 start = time.time() | 892 start = time.time() |