changeset 13332:ecea358f97be

mx trufflejar: do not strip debug attributes
author Andreas Woess <andreas.woess@jku.at>
date Sat, 14 Dec 2013 02:57:09 +0100
parents 51b2999299bc
children 1c446564d36c
files mx/mx_graal.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mx/mx_graal.py	Sat Dec 14 02:49:18 2013 +0100
+++ b/mx/mx_graal.py	Sat Dec 14 02:57:09 2013 +0100
@@ -1452,7 +1452,7 @@
 
     mx.distribution('GRAAL').add_update_listener(_installGraalJarInJdks)
 
-def packagejar(classpath, outputFile, mainClass, annotationProcessor=None):
+def packagejar(classpath, outputFile, mainClass=None, annotationProcessor=None, stripDebug=False):
     prefix = '' if mx.get_os() != 'windows' else '\\??\\' # long file name hack
     print "creating", outputFile
     filecount, totalsize = 0, 0
@@ -1483,5 +1483,5 @@
             filecount += 1
             totalsize += zi.file_size
     print "%d files (total size: %.2f kB, jar size: %.2f kB)" % (filecount, totalsize / 1e3, os.path.getsize(outputFile) / 1e3)
-    mx.run([mx.exe_suffix(join(mx.java().jdk, 'bin', 'pack200')), '-r', '-G', outputFile])
+    mx.run([mx.exe_suffix(join(mx.java().jdk, 'bin', 'pack200')), '-r'] + (['-G'] if stripDebug else []) + [outputFile])
     print "repacked jar size: %.2f kB" % (os.path.getsize(outputFile) / 1e3)