# HG changeset patch # User Andreas Woess # Date 1386986229 -3600 # Node ID ecea358f97beed99ee3bfe79f6d317c7b835ecbd # Parent 51b2999299bc5f98bd3d55a6902268819d29a71e mx trufflejar: do not strip debug attributes diff -r 51b2999299bc -r ecea358f97be mx/mx_graal.py --- 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)