Mercurial > hg > truffle
comparison mx/commands.py @ 4575:ccb5369481a2
Clarified mx help text on how to build/run [Graal|Client|Server].
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 13 Feb 2012 10:27:38 +0100 |
parents | 76841bdd5f3e |
children | bc8b58c11768 |
comparison
equal
deleted
inserted
replaced
4574:ab4a47b6a187 | 4575:ccb5369481a2 |
---|---|
341 if logFile: | 341 if logFile: |
342 log.close() | 342 log.close() |
343 return ret | 343 return ret |
344 | 344 |
345 def build(args): | 345 def build(args): |
346 """builds the GraalVM binary and compiles the Graal classes | 346 """build the VM binary |
347 | 347 |
348 The optional last argument specifies what type of VM to build.""" | 348 The global '--vm' option selects which VM to build. This command also |
349 compiles the Graal classes irrespective of what VM is being built. | |
350 The optional last argument specifies what build level is to be used | |
351 for the VM binary.""" | |
349 | 352 |
350 # Call mx.build to compile the Java sources | 353 # Call mx.build to compile the Java sources |
351 opts2 = mx.build(['--source', '1.7'] + args, parser=ArgumentParser(prog='mx build')) | 354 opts2 = mx.build(['--source', '1.7'] + args, parser=ArgumentParser(prog='mx build')) |
352 | 355 |
353 if not _vmSourcesAvailable or not opts2.native: | 356 if not _vmSourcesAvailable or not opts2.native: |
428 with open(jvmCfg, 'w') as f: | 431 with open(jvmCfg, 'w') as f: |
429 for line in lines: | 432 for line in lines: |
430 f.write(line) | 433 f.write(line) |
431 | 434 |
432 def vm(args, vm=None, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, vmbuild=None): | 435 def vm(args, vm=None, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, vmbuild=None): |
433 """run the GraalVM""" | 436 """run the VM selected by the '--vm' option""" |
434 | 437 |
435 if vm is None: | 438 if vm is None: |
436 vm = _vm | 439 vm = _vm |
437 | 440 |
438 build = vmbuild if vmbuild is not None else _vmbuild if _vmSourcesAvailable else 'product' | 441 build = vmbuild if vmbuild is not None else _vmbuild if _vmSourcesAvailable else 'product' |
684 vmArgs.remove('-it') | 687 vmArgs.remove('-it') |
685 benchArgs.remove(args[itIdx+1]) | 688 benchArgs.remove(args[itIdx+1]) |
686 sanitycheck.getSPECjvm2008(benchArgs, skipValid, wt, it).bench('graal', opts=vmArgs) | 689 sanitycheck.getSPECjvm2008(benchArgs, skipValid, wt, it).bench('graal', opts=vmArgs) |
687 | 690 |
688 def hsdis(args): | 691 def hsdis(args): |
689 """Installs the hsdis library | 692 """install the hsdis library |
690 | 693 |
691 This is needed to support HotSpot's assembly dumping features. | 694 This is needed to support HotSpot's assembly dumping features. |
692 By default it installs the Intel syntax version, use the 'att' argument to install AT&T syntax.""" | 695 By default it installs the Intel syntax version, use the 'att' argument to install AT&T syntax.""" |
693 flavor = 'intel' | 696 flavor = 'intel' |
694 if 'att' in args: | 697 if 'att' in args: |
715 'unittest' : [unittest, '[filters...]'], | 718 'unittest' : [unittest, '[filters...]'], |
716 'vm': [vm, '[-options] class [args...]'] | 719 'vm': [vm, '[-options] class [args...]'] |
717 } | 720 } |
718 | 721 |
719 if (_vmSourcesAvailable): | 722 if (_vmSourcesAvailable): |
720 mx.add_argument('--vm', action='store', dest='vm', default='graal', choices=['graal', 'server', 'client'], help='the VM to run (default: graal)') | 723 mx.add_argument('--vm', action='store', dest='vm', default='graal', choices=['graal', 'server', 'client'], help='the VM to build/run (default: graal)') |
721 mx.add_argument('--product', action='store_const', dest='vmbuild', const='product', help='select the product build of the VM') | 724 mx.add_argument('--product', action='store_const', dest='vmbuild', const='product', help='select the product build of the VM') |
722 mx.add_argument('--debug', action='store_const', dest='vmbuild', const='debug', help='select the debug build of the VM') | 725 mx.add_argument('--debug', action='store_const', dest='vmbuild', const='debug', help='select the debug build of the VM') |
723 mx.add_argument('--fastdebug', action='store_const', dest='vmbuild', const='fastdebug', help='select the fast debug build of the VM') | 726 mx.add_argument('--fastdebug', action='store_const', dest='vmbuild', const='fastdebug', help='select the fast debug build of the VM') |
724 | 727 |
725 commands.update({ | 728 commands.update({ |