Skip to content

Commit ca4af6f

Browse files
committed
try setting rpath correctly for C API
1 parent eea7d39 commit ca4af6f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

graalpython/com.oracle.graal.python.cext/setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@
5656
darwin_native = sys.platform == "darwin" and sys.graal_python_platform_id == "native"
5757
so_ext = get_config_var("EXT_SUFFIX")
5858

59+
60+
if darwin_native:
61+
get_config_vars()["LDSHARED"] = get_config_vars()['LDSHARED_LINUX'] + " -L" + sys.graal_python_capi_home + " -lpython." + get_config_vars()["SOABI"] + " -rpath '@loader_path/../'"
62+
63+
5964
def system(cmd, msg=""):
6065
logger.debug("Running command: " + cmd)
6166
status = os.system(cmd)
@@ -243,7 +248,7 @@ def __call__(self):
243248
libs.append(dep.lib_name)
244249
library_dirs.append(dep.lib_install_dir)
245250
#runtime_library_dirs.append(dep.lib_install_dir)
246-
extra_link_args.append("-Wl,-rpath," + dep.lib_install_dir)
251+
#extra_link_args.append("-Wl,-rpath," + dep.lib_install_dir)
247252

248253
# If the dependency provides a header file, add the include path
249254
if dep.include_install_dir:

mx.graalpython/mx_graalpython.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ def _dev_pythonhome():
182182

183183

184184
def punittest(ars):
185-
if '--regex' not in ars:
185+
if not ars:
186186
args = ['--regex', r'(graal\.python)|(com\.oracle\.truffle\.tck\.tests)']
187+
else:
188+
args = []
187189
args += ["-Dgraal.TruffleCompilationExceptionsAreFatal=false",
188190
"-Dgraal.TruffleCompilationExceptionsArePrinted=true",
189191
"-Dgraal.TrufflePerformanceWarningsAreFatal=false"]

0 commit comments

Comments
 (0)