Mercurial > hg > graal-jvmci-8
comparison mx/commands.py @ 4147:55376d8953a6
Improved 'build' and 'clean' commands.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 19 Dec 2011 22:22:56 +0100 |
parents | 4eb5b2469b6f |
children | bf5efc22fb3f |
comparison
equal
deleted
inserted
replaced
4146:4eb5b2469b6f | 4147:55376d8953a6 |
---|---|
33 _graal_home = dirname(dirname(__file__)) | 33 _graal_home = dirname(dirname(__file__)) |
34 _vmbuild = 'product' | 34 _vmbuild = 'product' |
35 | 35 |
36 def clean(args): | 36 def clean(args): |
37 """cleans the GraalVM source tree""" | 37 """cleans the GraalVM source tree""" |
38 mx.clean(args) | |
38 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16') | 39 os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16') |
39 mx.run([mx.gmake_cmd(), 'clean'], cwd=join(_graal_home, 'make')) | 40 mx.run([mx.gmake_cmd(), 'clean'], cwd=join(_graal_home, 'make')) |
40 | 41 |
41 def example(args): | 42 def example(args): |
42 """run some or all Graal examples""" | 43 """run some or all Graal examples""" |
179 """builds the GraalVM binary and compiles the Graal classes | 180 """builds the GraalVM binary and compiles the Graal classes |
180 | 181 |
181 The optional argument specifies what type of VM to build.""" | 182 The optional argument specifies what type of VM to build.""" |
182 | 183 |
183 build = 'product' | 184 build = 'product' |
184 if len(args) != 0 and not args[len(args) - 1].startswith('-'): | 185 if len(args) != 0 and not args[0].startswith('-'): |
185 build = args.pop() | 186 build = args.pop(0) |
186 | 187 |
187 # Call mx.build to compile the Java sources | 188 # Call mx.build to compile the Java sources |
188 mx.build(args) | 189 mx.build(args + ['--source', '1.7']) |
189 | 190 |
190 def fix_jvm_cfg(jdk): | 191 def fix_jvm_cfg(jdk): |
191 jvmCfg = join(jdk, 'jre', 'lib', 'amd64', 'jvm.cfg') | 192 jvmCfg = join(jdk, 'jre', 'lib', 'amd64', 'jvm.cfg') |
192 found = False | 193 found = False |
193 if not exists(jvmCfg): | 194 if not exists(jvmCfg): |