Mercurial > hg > truffle
comparison mx/commands.py @ 7788:dbbe8ce3bfa5
commands: accept 'server0' as a vm, accept version number which have '-...' suffix (-internal, -ea...)
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 13 Feb 2013 18:33:54 +0100 |
parents | 18eea22675ad |
children | 9bff64f43299 |
comparison
equal
deleted
inserted
replaced
7787:2865133eeef2 | 7788:dbbe8ce3bfa5 |
---|---|
1150 } | 1150 } |
1151 | 1151 |
1152 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) | 1152 mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) |
1153 | 1153 |
1154 if (_vmSourcesAvailable): | 1154 if (_vmSourcesAvailable): |
1155 mx.add_argument('--vm', action='store', dest='vm', default='graal', choices=['graal', 'server', 'client'], help='the VM to build/run (default: graal)') | 1155 mx.add_argument('--vm', action='store', dest='vm', default='graal', choices=['graal', 'server', 'client', 'server0'], help='the VM to build/run (default: graal)') |
1156 mx.add_argument('--product', action='store_const', dest='vmbuild', const='product', help='select the product build of the VM') | 1156 mx.add_argument('--product', action='store_const', dest='vmbuild', const='product', help='select the product build of the VM') |
1157 mx.add_argument('--debug', action='store_const', dest='vmbuild', const='debug', help='select the debug build of the VM') | 1157 mx.add_argument('--debug', action='store_const', dest='vmbuild', const='debug', help='select the debug build of the VM') |
1158 mx.add_argument('--fastdebug', action='store_const', dest='vmbuild', const='fastdebug', help='select the fast debug build of the VM') | 1158 mx.add_argument('--fastdebug', action='store_const', dest='vmbuild', const='fastdebug', help='select the fast debug build of the VM') |
1159 mx.add_argument('--ecl', action='store_true', dest='make_eclipse_launch', help='create launch configuration for running VM execution(s) in Eclipse') | 1159 mx.add_argument('--ecl', action='store_true', dest='make_eclipse_launch', help='create launch configuration for running VM execution(s) in Eclipse') |
1160 mx.add_argument('--native-dbg', action='store', dest='native_dbg', help='Start the vm inside a debugger', metavar='<debugger>') | 1160 mx.add_argument('--native-dbg', action='store', dest='native_dbg', help='Start the vm inside a debugger', metavar='<debugger>') |
1167 }) | 1167 }) |
1168 | 1168 |
1169 mx.commands.update(commands) | 1169 mx.commands.update(commands) |
1170 | 1170 |
1171 def mx_post_parse_cmd_line(opts): | 1171 def mx_post_parse_cmd_line(opts): |
1172 version = mx.java().version | 1172 version = mx.java().version.split('-')[0] |
1173 parts = version.split('.') | 1173 parts = version.split('.') |
1174 assert len(parts) >= 2 | 1174 assert len(parts) >= 2 |
1175 assert parts[0] == '1' | 1175 assert parts[0] == '1' |
1176 major = int(parts[1]) | 1176 major = int(parts[1]) |
1177 minor = 0 | 1177 minor = 0 |