diff 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
line wrap: on
line diff
--- a/mx/commands.py	Mon Dec 19 21:48:32 2011 +0100
+++ b/mx/commands.py	Mon Dec 19 22:22:56 2011 +0100
@@ -35,6 +35,7 @@
 
 def clean(args):
     """cleans the GraalVM source tree"""
+    mx.clean(args)
     os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16')
     mx.run([mx.gmake_cmd(), 'clean'], cwd=join(_graal_home, 'make'))
 
@@ -181,11 +182,11 @@
     The optional argument specifies what type of VM to build."""
 
     build = 'product'
-    if len(args) != 0 and not args[len(args) - 1].startswith('-'):
-        build = args.pop()
+    if len(args) != 0 and not args[0].startswith('-'):
+        build = args.pop(0)
 
     # Call mx.build to compile the Java sources        
-    mx.build(args)
+    mx.build(args + ['--source', '1.7'])
 
     def fix_jvm_cfg(jdk):
         jvmCfg = join(jdk, 'jre', 'lib', 'amd64', 'jvm.cfg')