comparison mx.graal/mx_graal.py @ 22644:54257f3273df

Always put TRUFFLE_API on the bootclasspath Use mx_jvmci to always prepend TRUFFLE_API to the bootclasspath for jvmci JDKs.
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Wed, 16 Sep 2015 14:42:30 +0200
parents 8b198b0e6ef9
children 475ce82f1cdd
comparison
equal deleted inserted replaced
22643:9ecfccd6eec1 22644:54257f3273df
33 import re 33 import re
34 34
35 import mx 35 import mx
36 import mx_jvmci 36 import mx_jvmci
37 from mx_jvmci import JvmciJDKDeployedDist, run_vm, VM, Task, get_vm, isJVMCIEnabled, get_jvmci_jdk, get_jvmci_jdk_dir, buildvms 37 from mx_jvmci import JvmciJDKDeployedDist, run_vm, VM, Task, get_vm, isJVMCIEnabled, get_jvmci_jdk, get_jvmci_jdk_dir, buildvms
38 import mx_unittest
39 from mx_unittest import unittest 38 from mx_unittest import unittest
40 import mx_gate 39 import mx_gate
41 40
42 _suite = mx.suite('graal') 41 _suite = mx.suite('graal')
43 42
80 JvmciJDKDeployedDist('GRAAL_TRUFFLE_HOTSPOT'), 79 JvmciJDKDeployedDist('GRAAL_TRUFFLE_HOTSPOT'),
81 ] 80 ]
82 81
83 mx_gate.add_jacoco_includes(['com.oracle.graal.*']) 82 mx_gate.add_jacoco_includes(['com.oracle.graal.*'])
84 mx_gate.add_jacoco_excluded_annotations(['@Snippet', '@ClassSubstitution']) 83 mx_gate.add_jacoco_excluded_annotations(['@Snippet', '@ClassSubstitution'])
85
86 def _unittest_config_participant(config):
87 vmArgs, mainClass, mainClassArgs = config
88 # Unconditionally prepend truffle.jar to the boot class path.
89 # This used to be done by the VM itself but was removed to
90 # separate the VM from Truffle.
91 truffle_jar = mx.distribution('truffle:TRUFFLE_API').path
92 vmArgs = ['-Xbootclasspath/p:' + truffle_jar] + vmArgs
93 return (vmArgs, mainClass, mainClassArgs)
94
95 mx_unittest.add_config_participant(_unittest_config_participant)
96 84
97 def _run_benchmark(args, availableBenchmarks, runBenchmark): 85 def _run_benchmark(args, availableBenchmarks, runBenchmark):
98 86
99 vmOpts, benchmarksAndOptions = mx.extract_VM_args(args, useDoubleDash=availableBenchmarks is None) 87 vmOpts, benchmarksAndOptions = mx.extract_VM_args(args, useDoubleDash=availableBenchmarks is None)
100 88
488 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], 476 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'],
489 'microbench' : [microbench, '[VM options] [-- [JMH options]]'], 477 'microbench' : [microbench, '[VM options] [-- [JMH options]]'],
490 'deoptalot' : [deoptalot, '[n]'], 478 'deoptalot' : [deoptalot, '[n]'],
491 'longtests' : [longtests, ''], 479 'longtests' : [longtests, ''],
492 }) 480 })
481
482
483 def mx_post_parse_cmd_line(opts):
484 mx_jvmci.add_bootclasspath_prepend(mx.distribution('truffle:TRUFFLE_API'))