2121# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
2222# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
2323# OF THE POSSIBILITY OF SUCH DAMAGE.
24- from argparse import ArgumentParser
2524import os
2625import platform
2726import re
2827import shutil
2928import subprocess
3029import sys
3130import tempfile
31+ from argparse import ArgumentParser
3232
3333import mx
3434import mx_benchmark
3535import mx_gate
3636import mx_sdk
3737import mx_subst
3838import mx_urlrewrites
39- from mx_downstream import testdownstream
4039from mx_gate import Task
4140from mx_graalpython_benchmark import PythonBenchmarkSuite
4241from mx_unittest import unittest
@@ -57,10 +56,12 @@ def _get_stdlib_home():
5756def _get_svm_binary ():
5857 return os .path .join (_suite .dir , "graalpython-svm" )
5958
59+
6060def __get_svm_binary_from_graalvm ():
6161 vmdir = os .path .join (mx .suite ("truffle" ).dir , ".." , "vm" )
6262 return os .path .join (vmdir , "mxbuild" , "-" .join ([mx .get_os (), mx .get_arch ()]), "graalpython.image" , "graalpython" )
6363
64+
6465def _extract_graalpython_internal_options (args ):
6566 internal = []
6667 non_internal = []
@@ -148,6 +149,10 @@ def _extract_graalpython_internal_options(args):
148149 # internal += ['-Dgraal.MaximumLoopExplosionCount=1000']
149150 # internal += ['-Dgraal.TruffleCompilationThreshold=100000']
150151
152+ elif arg == '-compile-truffle-immediately' and _mx_graal :
153+ internal += ['-Dgraal.TruffleCompileImmediately=true' ]
154+ internal += ['-Dgraal.TruffleCompilationExceptionsAreThrown=true' ]
155+
151156 else :
152157 non_internal += [arg ]
153158
@@ -857,6 +862,7 @@ def import_python_sources(args):
857862 _suite .vc .update (_suite .dir , rev = tip )
858863 _suite .vc .git_command (_suite .dir , ["merge" , "python-import" ])
859864
865+
860866# ----------------------------------------------------------------------------------------------------------------------
861867#
862868# add the defined python benchmark suites
0 commit comments