Skip to content

Commit b8241db

Browse files
committed
Fix building frozen modules: manually add GRAALPYTHON_VERSIONS_MAIN to classpath
1 parent 0e27934 commit b8241db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ def do_run_python(args, extra_vm_args=None, env=None, jdk=None, extra_dists=None
271271
if minimal:
272272
x = [x for x in SUITE.dists if x.name == "GRAALPYTHON"][0]
273273
dists = [dep for dep in x.deps if dep.isJavaProject() or dep.isJARDistribution()]
274+
# Hack: what we should just do is + ['GRAALPYTHON_VERSIONS_MAIN'] and let MX figure out
275+
# the class-path and other VM arguments necessary for it. However, due to a bug in MX,
276+
# LayoutDirDistribution causes an exception if passed to mx.get_runtime_jvm_args,
277+
# because it does not properly initialize its super class ClasspathDependency, see MX PR: 1665.
278+
ver_dep = mx.dependency('GRAALPYTHON_VERSIONS_MAIN').get_output()
279+
cp_prefix = ver_dep if cp_prefix is None else (ver_dep + os.pathsep + cp_prefix)
274280
else:
275281
dists = ['GRAALPYTHON']
276282
dists += ['TRUFFLE_NFI', 'SULONG_NATIVE', 'GRAALPYTHON-LAUNCHER']

0 commit comments

Comments
 (0)