File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
com.oracle.graal.python.shell/src/com/oracle/graal/python/shell Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2017, 2022 , Oracle and/or its affiliates.
2
+ * Copyright (c) 2017, 2023 , Oracle and/or its affiliates.
3
3
* Copyright (c) 2013, Regents of the University of California
4
4
*
5
5
* All rights reserved.
@@ -687,6 +687,14 @@ protected void launch(Builder contextBuilder) {
687
687
evalInternal (context , "__graalpython__.startup_wall_clock_ts = " + startupWallClockTime + "; __graalpython__.startup_nano = " + startupNanoTime );
688
688
}
689
689
690
+ // Set LD_LIBRARY_PATH so that binaries built with sulong toolchain can find libc++.so
691
+ evalInternal (context , """
692
+ import os
693
+ path = os.environ.get('LD_LIBRARY_PATH', '')
694
+ sulong_path = os.pathsep.join(__graalpython__.get_toolchain_paths('LD_LIBRARY_PATH'))
695
+ os.environ['LD_LIBRARY_PATH'] = path + os.pathsep + sulong_path if path else sulong_path
696
+ """ );
697
+
690
698
if (!quietFlag && (verboseFlag || (commandString == null && inputFile == null && stdinIsInteractive ))) {
691
699
print ("Python " + evalInternal (context , "import sys; sys.version + ' on ' + sys.platform" ).asString ());
692
700
if (!noSite ) {
Original file line number Diff line number Diff line change @@ -788,6 +788,7 @@ def is_env_var_to_ignore(n):
788
788
n == 'LD_PRELOAD' or n .startswith ('SANDBOX' ) or # Gentoo
789
789
n == 'PWD' or n == 'SHLVL' or # Graalpython bash launcher
790
790
n .startswith ('JAVA_MAIN_CLASS' ) or # JVM on MacOS
791
+ n == 'LD_LIBRARY_PATH' or # Added by graalpy launcher
791
792
n == 'LC_CTYPE' ) # Locale coercion triggered
792
793
793
794
with subprocess .Popen ([sys .executable , "-c" ,
You can’t perform that action at this time.
0 commit comments