changeset 5189:6fbf12b8e572

automated download of hsdis lib if PrintAssembly option is used; added support for hsdis on the Mac
author Doug Simon <doug.simon@oracle.com>
date Tue, 03 Apr 2012 21:31:32 +0200
parents c49f9f0b9aad
children cb3245503a5e
files mx/commands.py mxtool/mx.py
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mx/commands.py	Tue Apr 03 10:58:23 2012 +0200
+++ b/mx/commands.py	Tue Apr 03 21:31:32 2012 +0200
@@ -520,7 +520,9 @@
         vm = _vm
         
     build = vmbuild if vmbuild is not None else _vmbuild if _vmSourcesAvailable else 'product'
-    mx.expand_project_in_args(args)  
+    mx.expand_project_in_args(args)
+    if len([a for a in args if 'PrintAssembly' in a]) != 0:
+        hsdis([])
     if mx.java().debug_port is not None:
         args = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=' + str(mx.java().debug_port)] + args
     if _jacoco == 'on' or _jacoco == 'append':
@@ -895,7 +897,8 @@
     build = _vmbuild if _vmSourcesAvailable else 'product'
     lib = mx.lib_suffix('hsdis-amd64')
     path = join(_vmLibDirInJdk(_jdk(build)), lib)
-    mx.download(path, ['http://lafo.ssw.uni-linz.ac.at/hsdis/' + flavor + "/" + lib])
+    if not exists(path):
+        mx.download(path, ['http://lafo.ssw.uni-linz.ac.at/hsdis/' + flavor + "/" + lib])
     
 def jacocoreport(args):
     """creates a JaCoCo coverage report
--- a/mxtool/mx.py	Tue Apr 03 10:58:23 2012 +0200
+++ b/mxtool/mx.py	Tue Apr 03 21:31:32 2012 +0200
@@ -728,8 +728,10 @@
     os = get_os();
     if os == 'windows':
         return name + '.dll'
-    if os == 'linux':
+    if os == 'linux' or os == 'solaris':
         return name + '.so'
+    if os == 'darwin':
+        return name + '.dylib'
     return name
 
 """