Skip to content

Commit 4dea0e2

Browse files
committed
Set the nfi posix backend as default in the launcher
1 parent 629b612 commit 4dea0e2

File tree

7 files changed

+688
-24
lines changed

7 files changed

+688
-24
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,13 @@ protected void launch(Builder contextBuilder) {
563563

564564
contextBuilder.option("python.CheckHashPycsMode", checkHashPycsMode);
565565

566+
if (getContextOptionIfSetViaCommandLine("python.PosixModuleBackend") == null && getContextOptionIfSetViaCommandLine("PosixModuleBackend") == null) {
567+
// TODO find a proper way to force emulated backend in llvm.managed mode
568+
if (getClass() == GraalPythonMain.class) {
569+
contextBuilder.option("python.PosixModuleBackend", "native");
570+
}
571+
}
572+
566573
if (multiContext) {
567574
contextBuilder.engine(Engine.newBuilder().allowExperimentalOptions(true).options(enginePolyglotOptions).build());
568575
}

0 commit comments

Comments
 (0)