Mercurial > hg > truffle
diff mx/commands.py @ 8134:6e3ebc6fd5a4
graal.jar is installed in all JDKs every time it is updated (GRAAL-136)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 06 Mar 2013 20:25:57 +0100 |
parents | 394f685c1502 |
children | 8d10fc6b4f6c |
line wrap: on
line diff
--- a/mx/commands.py Wed Mar 06 18:04:54 2013 +0100 +++ b/mx/commands.py Wed Mar 06 20:25:57 2013 +0100 @@ -373,8 +373,20 @@ else: if not exists(jdk): mx.abort('The ' + build + ' VM has not been created - run \'mx clean; mx build ' + build + '\'') + + _installGraalJarInJdks(mx.distribution('GRAAL')) + return jdk +def _installGraalJarInJdks(graalDist): + graalJar = graalDist.path + jdks = join(_graal_home, 'jdk' + str(mx.java().version)) + if exists(jdks): + for e in os.listdir(jdks): + jreLibDir = join(jdks, e, 'jre', 'lib') + if exists(jreLibDir): + shutil.copyfile(graalJar, join(jreLibDir, 'graal.jar')) + # run a command in the windows SDK Debug Shell def _runInDebugShell(cmd, workingDir, logFile=None, findInOutput=None, respondTo={}): newLine = os.linesep @@ -1177,3 +1189,5 @@ _jacoco = opts.jacoco global _native_dbg _native_dbg = opts.native_dbg + + mx.distribution('GRAAL').add_update_listener(_installGraalJarInJdks)