Skip to content

Commit 6b55141

Browse files
committed
Convenience env variables for debugging frozen modules build
1 parent c437b50 commit 6b55141

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2478,9 +2478,12 @@ def build(self):
24782478
# We freeze modules twice: once for the manual Bytecode interpreter and once for the DSL interpreter.
24792479
args = [mx_subst.path_substitutions.substitute(a, dependency=self) for a in cast(GraalpythonProject, self.subject).args]
24802480

2481+
manual_vm_args = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:8000"] if 'DEBUG_FROZEN' in os.environ else []
2482+
dsl_vm_args = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:8000"] if 'DEBUG_FROZEN_BCI' in os.environ else []
2483+
24812484
return bool(
2482-
self.run_for(args, "manual bytecode") or
2483-
self.run_for(args, "dsl", extra_vm_args=["-Dpython.EnableBytecodeDSLInterpreter=true"])
2485+
self.run_for(args, "manual bytecode", extra_vm_args=manual_vm_args) or
2486+
self.run_for(args, "dsl", extra_vm_args=dsl_vm_args + ["-Dpython.EnableBytecodeDSLInterpreter=true"])
24842487
)
24852488

24862489
def run_for(self, args, interpreter_kind, extra_vm_args=None):

0 commit comments

Comments
 (0)