Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
8133:396a059fdeed | 8134:6e3ebc6fd5a4 |
---|---|
371 except SystemExit: | 371 except SystemExit: |
372 pass | 372 pass |
373 else: | 373 else: |
374 if not exists(jdk): | 374 if not exists(jdk): |
375 mx.abort('The ' + build + ' VM has not been created - run \'mx clean; mx build ' + build + '\'') | 375 mx.abort('The ' + build + ' VM has not been created - run \'mx clean; mx build ' + build + '\'') |
376 | |
377 _installGraalJarInJdks(mx.distribution('GRAAL')) | |
378 | |
376 return jdk | 379 return jdk |
380 | |
381 def _installGraalJarInJdks(graalDist): | |
382 graalJar = graalDist.path | |
383 jdks = join(_graal_home, 'jdk' + str(mx.java().version)) | |
384 if exists(jdks): | |
385 for e in os.listdir(jdks): | |
386 jreLibDir = join(jdks, e, 'jre', 'lib') | |
387 if exists(jreLibDir): | |
388 shutil.copyfile(graalJar, join(jreLibDir, 'graal.jar')) | |
377 | 389 |
378 # run a command in the windows SDK Debug Shell | 390 # run a command in the windows SDK Debug Shell |
379 def _runInDebugShell(cmd, workingDir, logFile=None, findInOutput=None, respondTo={}): | 391 def _runInDebugShell(cmd, workingDir, logFile=None, findInOutput=None, respondTo={}): |
380 newLine = os.linesep | 392 newLine = os.linesep |
381 STARTTOKEN = 'RUNINDEBUGSHELL_STARTSEQUENCE' | 393 STARTTOKEN = 'RUNINDEBUGSHELL_STARTSEQUENCE' |
1175 _make_eclipse_launch = getattr(opts, 'make_eclipse_launch', False) | 1187 _make_eclipse_launch = getattr(opts, 'make_eclipse_launch', False) |
1176 global _jacoco | 1188 global _jacoco |
1177 _jacoco = opts.jacoco | 1189 _jacoco = opts.jacoco |
1178 global _native_dbg | 1190 global _native_dbg |
1179 _native_dbg = opts.native_dbg | 1191 _native_dbg = opts.native_dbg |
1192 | |
1193 mx.distribution('GRAAL').add_update_listener(_installGraalJarInJdks) |