Skip to content

Commit 27f5e5a

Browse files
committed
[GR-23958] Use dummy libR.so and actually implement R API in libRnative.so and libRllvm.so.
PullRequest: fastr/2476
2 parents 3f24d31 + c279482 commit 27f5e5a

File tree

16 files changed

+132
-110
lines changed

16 files changed

+132
-110
lines changed

com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/common/LibPaths.java

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,14 +30,6 @@
3030

3131
public class LibPaths {
3232

33-
/**
34-
* Returns the absolute path to the directory containing the builtin libraries.
35-
*/
36-
@TruffleBoundary
37-
public static String getBuiltinLibPath(RContext context) {
38-
return REnvVars.getRHomeTruffleFile(context).resolve("lib").toString();
39-
}
40-
4133
/**
4234
* Returns the absolute path to the builtin library {@code libName} for use with
4335
* {@link System#load}.
@@ -48,12 +40,7 @@ public static String getBuiltinLibPath(RContext context, String libName) {
4840
return REnvVars.getRHomeTruffleFile(context).resolve("lib").resolve("lib" + libName + "." + osInfo.libExt).toString();
4941
}
5042

51-
/**
52-
* Returns the absolute path to the shared library associated with package {@code name}. (Does
53-
* not check for existence).
54-
*/
55-
@TruffleBoundary
56-
public static String getPackageLibPath(RContext context, String name) {
57-
return REnvVars.getRHomeTruffleFile(context).resolve("library").resolve(name).resolve("libs").resolve(name + ".so").toString();
43+
public static String normalizeLibRPath(String path, String backend) {
44+
return path.replace(".so", backend + ".so").replace(".dylib", backend + ".dylib");
5845
}
5946
}

com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_DLL.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import com.oracle.truffle.api.interop.UnsupportedMessageException;
3636
import com.oracle.truffle.api.nodes.Node;
3737
import com.oracle.truffle.api.source.Source;
38+
import com.oracle.truffle.r.ffi.impl.common.LibPaths;
3839
import com.oracle.truffle.r.runtime.DSLConfig;
3940
import com.oracle.truffle.r.runtime.REnvVars;
4041
import com.oracle.truffle.r.runtime.RError;
@@ -71,7 +72,7 @@ static LibHandle dlOpen(RContext context, String path) {
7172
boolean isLibR = libName.equals("libR");
7273
if (isLibR) {
7374
// TODO: make it generic, if +"l" file exists, use that instead
74-
file = context.getSafeTruffleFile(path + "l");
75+
file = context.getSafeTruffleFile(LibPaths.normalizeLibRPath(path, "llvm"));
7576
}
7677
boolean isInitialization = isLibR;
7778
Object before = null;

com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_DLL.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,21 @@ public LibHandle execute(String path, boolean local, boolean now) {
6565
}
6666
}
6767

68-
public static LibHandle dlOpen(RContext ctx, String path, boolean local, boolean now) {
68+
public static LibHandle dlOpen(RContext ctx, String pathIn, boolean local, boolean now) {
6969
String librffiPath = LibPaths.getBuiltinLibPath(ctx, "R");
7070
// Do not call before/afterDowncall when loading libR to prevent the pushing/popping of
7171
// the callback array, which requires that the libR have already been loaded
72-
boolean notifyStateRFFI = !librffiPath.equals(path);
72+
String path = pathIn;
73+
boolean isLibR = librffiPath.equals(path);
74+
if (isLibR) {
75+
// In case of libR.so we are actually going to load libR.son, the libR.so is an empty
76+
// dummy library,
77+
// which is there so that packages can be linked against it, but we load the R API
78+
// (implemented in libR.son)
79+
// here explicitly before loading any package
80+
path = LibPaths.normalizeLibRPath(path, "native");
81+
}
82+
boolean notifyStateRFFI = !isLibR;
7383
Object before = notifyStateRFFI ? ctx.getStateRFFI().beforeDowncall(null, Type.NFI) : 0;
7484
try {
7585
String libName = DLL.libName(ctx, path);

com.oracle.truffle.r.native/fficall/Makefile

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@
2424
# Builds libR
2525
#
2626
# We build all the source files with the given compiler (CC), which may be the Labs LLVM clang that produces embedded bitcode.
27-
# When building the final artifact, we either build only libR.so from the source files in common and NFI specific directories,
28-
# and if FASTR_RFFI is "LLVM", we build also libR.sol, which is a regular so file with embedded bitcode, but that one is built
29-
# from the source files in common and LLVM specific directories.
27+
#
28+
# In order to support running both backend (NFI and Sulong) in one process, we produce three artifacts here:
29+
# * libR.so - dummy library, which standard name in standard location that most of the packages will link with
30+
# - when the native loader/Sulong is loading a package (e.g., stats.so), it loads this dummy libR.so
31+
# * libRnative.so - library with actual implementation of the R API for NFI
32+
# - dlopen'ed by FastR into the global space (RTLD_GLOBAL)
33+
# * libRllvm.so - library with actual implementation of the R API for Sulong
34+
# - FastR explicitly loads this via Sulong
3035
#
3136
# This is the only situation, where we produce different artifacts for NFI/LLVM. When building pacakges,
3237
# we produce only one so file with embedded bitcode that is supposed to be used for both NFI and LLVM execution
@@ -52,11 +57,12 @@ endif
5257
.PHONY: all clean
5358

5459
C_LIBNAME := libR$(DYLIB_EXT)
55-
LLVM_LIBNAME := libR$(DYLIB_EXT)l
56-
C_LIB := $(FASTR_LIB_DIR)/$(C_LIBNAME)
60+
NFI_LIBNAME := libRnative$(DYLIB_EXT)
61+
LLVM_LIBNAME := libRllvm$(DYLIB_EXT)
62+
63+
R_LIB := $(FASTR_LIB_DIR)/$(C_LIBNAME)
64+
NFI_LIB := $(FASTR_LIB_DIR)/$(NFI_LIBNAME)
5765
LLVM_LIB := $(FASTR_LIB_DIR)/$(LLVM_LIBNAME)
58-
R_LIBNAME := libR$(DYLIB_EXT)
59-
R_LIB := $(FASTR_LIB_DIR)/$(R_LIBNAME)
6066

6167
ifeq ($(OS_NAME), Darwin)
6268
VERSION_FLAGS := -current_version $(R_VERSION) -compatibility_version $(R_VERSION)
@@ -75,34 +81,31 @@ ifeq ($(FASTR_RFFI),managed)
7581
# nop
7682
else
7783
ifeq ($(OS_NAME),Darwin)
78-
$(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -o $(R_LIB) $(wildcard lib/nfi/*.o) $(wildcard lib/common/*.o) $(wildcard lib/JavaGD/*.o) -L$(FASTR_LIB_DIR) -ldl -lRblas -lRlapack -lpcre -lz $(F2C) -liconv $(VERSION_FLAGS)
79-
$(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -o $(LLVM_LIB) $(wildcard lib/llvm/*.o) $(wildcard lib/common/*.o) $(wildcard lib/JavaGD/*.o) -L$(FASTR_LIB_DIR) -L$(LLVM_LIBS_DIR) -lpolyglot-mock -ldl -lRblas -lRlapack -lpcre -lz $(F2C) -liconv $(VERSION_FLAGS)
84+
$(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -o $(R_LIB) -L$(FASTR_LIB_DIR) -lRblas -lRlapack $(VERSION_FLAGS)
85+
$(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -Wl,-undefined,dynamic_lookup -o $(NFI_LIB) $(wildcard lib/nfi/*.o) $(wildcard lib/common/*.o) $(wildcard lib/JavaGD/*.o) -L$(FASTR_LIB_DIR) -ldl -lR -lpcre -lz $(F2C) -liconv $(VERSION_FLAGS)
86+
$(DYLIB_LD) $(DYLIB_LDFLAGS) -Wl,-rpath,@loader_path/ -Wl,-undefined,dynamic_lookup -o $(LLVM_LIB) $(wildcard lib/llvm/*.o) $(wildcard lib/common/*.o) $(wildcard lib/JavaGD/*.o) -L$(FASTR_LIB_DIR) -L$(LLVM_LIBS_DIR) -lpolyglot-mock -ldl -lR -lpcre -lz $(F2C) -liconv $(VERSION_FLAGS)
8087

8188
install_name_tool -add_rpath @loader_path/ $(FASTR_LIB_DIR)/libRblas.dylib
8289
install_name_tool -add_rpath @loader_path/ $(FASTR_LIB_DIR)/libRlapack.dylib
83-
84-
# The following commands will be changed to use @loader_path (or @rpath) instead of the absolute paths $(LLVM_LIBS_DIR) and $(FASTR_LIB_DIR)
85-
# when Sulong supports @loader_path (resp. @rpath) substitution.
90+
8691
install_name_tool -change bin/libpolyglot-mock.dylib $(LLVM_LIBS_DIR)/libpolyglot-mock.dylib $(LLVM_LIB)
87-
#install_name_tool -change @rpath/libRblas.dylib $(FASTR_LIB_DIR)/libRblas.dylib $(LLVM_LIB)
88-
#install_name_tool -change @rpath/libRlapack.dylib $(FASTR_LIB_DIR)/libRlapack.dylib $(LLVM_LIB)
89-
#install_name_tool -change @rpath/libpcre.dylib $(FASTR_LIB_DIR)/libpcre.dylib $(LLVM_LIB)
90-
#install_name_tool -change @rpath/libz.dylib $(FASTR_LIB_DIR)/libz.dylib $(LLVM_LIB)
91-
#install_name_tool -change @rpath/libf2c.so $(FASTR_LIB_DIR)/libf2c$(DYLIB_EXT) $(LLVM_LIB)
9292

93-
install_name_tool -change libRblas.dylib @rpath/libRblas.dylib $(R_LIB)
94-
install_name_tool -change libRlapack.dylib @rpath/libRlapack.dylib $(R_LIB)
95-
install_name_tool -change libf2c.so @rpath/libf2c$(DYLIB_EXT) $(R_LIB)
93+
install_name_tool -change libRblas.dylib @rpath/libRblas.dylib $(NFI_LIB)
94+
install_name_tool -change libRlapack.dylib @rpath/libRlapack.dylib $(NFI_LIB)
95+
install_name_tool -change libf2c.so @rpath/libf2c$(DYLIB_EXT) $(NFI_LIB)
96+
9697
install_name_tool -id @rpath/libR.dylib $(R_LIB)
97-
install_name_tool -id @rpath/libR.dylibl $(LLVM_LIB)
98-
# check if we captured libpcre/libz, rpath those in libR
98+
install_name_tool -id @rpath/$(NFI_LIBNAME) $(NFI_LIB)
99+
install_name_tool -id @rpath/$(LLVM_LIBNAME) $(LLVM_LIB)
100+
# check if we captured libpcre/libz, rpath those in libR
99101
python $(FASTR_R_HOME)/mx.fastr/copylib.py updatelib $(FASTR_LIB_DIR) $(FASTR_R_HOME)
100102
else
101103
# not Darwin:
102-
$(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(R_LIB) $(wildcard lib/nfi/*.o) $(wildcard lib/common/*.o) $(wildcard lib/JavaGD/*.o) -L$(FASTR_LIB_DIR) -lRblas -lRlapack -ldl -lpcre -lz $(F2C)
104+
$(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(R_LIB) -L$(FASTR_LIB_DIR) -lRblas -lRlapack
105+
$(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(NFI_LIB) $(wildcard lib/nfi/*.o) $(wildcard lib/common/*.o) $(wildcard lib/JavaGD/*.o) -L$(FASTR_LIB_DIR) -lRblas -lRlapack -ldl -lpcre -lz $(F2C)
103106
# We do not link with Rlapack and Rblas so that we can load those libraries manually later after loading libR
104107
# Otherwise Sulong would attempt to load Rlapack and Rblas and fail, because there is a dependency cycle:
105-
# libR provides xerbla_, but Rlapack/Rblas depend on it, it seems that Sulong is not able to resolve this unlike the native loader
108+
# libR provides xerbla_, but Rlapack/Rblas depend on it, it seems that Sulong is not able to resolve this unlike the native loader
106109
$(DYLIB_LD) $(DYLIB_LDFLAGS) $(shell echo $(PKG_LDFLAGS_OVERRIDE)) -Wl,-rpath,'$$ORIGIN' -o $(LLVM_LIB) $(wildcard lib/llvm/*.o) $(wildcard lib/common/*.o) $(wildcard lib/JavaGD/*.o) -L$(FASTR_LIB_DIR) -ldl -lpcre -lz $(F2C)
107110
endif # Darwin
108111
endif # managed
@@ -131,13 +134,13 @@ common.done:
131134

132135
clean:
133136
$(MAKE) -C src/common clean
134-
rm -rf src/truffle_*/*.o
135-
rm -rf $(R_LIB)
136-
rm -rf fficall.done
137-
rm -rf common.done
138-
rm -rf fficallllvm.done
137+
rm -f src/truffle_*/*.o
138+
rm -f $(R_LIB) $(NFI_LIB) $(LLVM_LIB)
139+
rm -f fficall.done
140+
rm -f common.done
141+
rm -f fficallllvm.done
139142
$(MAKE) -C src/JavaGD clean
140-
rm -rf JavaGD.done
143+
rm -f JavaGD.done
141144
ifneq ($(FASTR_RFFI),managed)
142145
$(MAKE) -C src/truffle_nfi clean
143146
$(MAKE) -C src/truffle_llvm clean

com.oracle.truffle.r.native/gnur/patch/src/library/lib.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -99,7 +99,7 @@ $(OBJ):
9999
mkdir -p $(OBJ)
100100

101101
ifeq ($(OS_NAME),Darwin)
102-
RPATH_OPT =
102+
RPATH_OPT = -Wl,-undefined,dynamic_lookup
103103
else
104104
RPATH = $$ORIGIN/../../../lib/
105105
RPATH_OPT = -Wl,-rpath='$(RPATH)'

com.oracle.truffle.r.native/run/fastr_etc/Darwin/Makeconf.llvm

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ CXX17STD = -std=gnu++17
7070
CXX_VISIBILITY =
7171
DYLIB_EXT = .dylib
7272
DYLIB_LD = $(CC)
73-
DYLIB_LDFLAGS = "-Wl,-headerpad_max_install_names,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -single_module -multiply_defined suppress# $(CFLAGS) $(CPICFLAGS)
73+
DYLIB_LDFLAGS = "-Wl,-headerpad_max_install_names,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -single_module -multiply_defined suppress# $(CFLAGS) $(CPICFLAGS)
7474
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
7575
ECHO = echo
7676
ECHO_C = \c
@@ -110,7 +110,7 @@ JAR = $(JAVA_HOME)/bin/jar
110110
## JAVA_HOME might be used in the next three.
111111
## They are for packages 'JavaGD' and 'rJava'
112112
LAPACK_LIBS = -L"$(R_HOME)/lib$(R_ARCH)" -lRlapack
113-
LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -L"$(R_HOME)/../llvm/native/lib" -lf2c $(PKG_LDFLAGS_OVERRIDE)
113+
LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -L"$(R_HOME)/../llvm/native/lib" -lf2c $(PKG_LDFLAGS_OVERRIDE)
114114
## we only need this is if it is external, as otherwise link to R
115115
LIBM = -lm
116116
LIBR0 = -lR
@@ -122,7 +122,7 @@ LIBTOOL = $(SHELL) "$(R_HOME)/bin/libtool"
122122
LTO =
123123
## needed to build applications linking to static libR
124124
MAIN_LD = $(CC)
125-
MAIN_LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -L"$(R_HOME)/../llvm/native/lib" -lf2c
125+
MAIN_LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -L"$(R_HOME)/../llvm/native/lib" -lf2c
126126
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS)
127127
MKINSTALLDIRS = $(R_HOME)/bin/mkinstalldirs
128128
OBJC = $(CC)
@@ -137,19 +137,19 @@ SHELL = /bin/sh
137137
SHLIB_CFLAGS =
138138
SHLIB_CXXFLAGS =
139139
SHLIB_CXXLD = $(CXX)
140-
SHLIB_CXXLDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
140+
SHLIB_CXXLDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
141141
SHLIB_CXX98LD = $(CXX98) $(CXX98STD)
142-
SHLIB_CXX98LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
142+
SHLIB_CXX98LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
143143
SHLIB_CXX11LD = $(CXX11) $(CXX11STD)
144-
SHLIB_CXX11LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
144+
SHLIB_CXX11LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
145145
SHLIB_CXX14LD = $(CXX14) $(CXX14STD)
146-
SHLIB_CXX14LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
146+
SHLIB_CXX14LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
147147
SHLIB_CXX17LD = $(CXX17) $(CXX17STD)
148-
SHLIB_CXX17LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
148+
SHLIB_CXX17LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress
149149
SHLIB_EXT = .so
150150
SHLIB_FFLAGS =
151151
SHLIB_LD = $(CC)
152-
SHLIB_LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress# $(CFLAGS) $(CPICFLAGS)
152+
SHLIB_LDFLAGS = "-Wl,-rpath,$(R_HOME)/lib/,-rpath,$(R_HOME)/../llvm/native/lib,-undefined,dynamic_lookup" -L"$(R_HOME)/lib" -undefined dynamic_lookup -L"$(R_HOME)/../llvm/native/lib" -lf2c -dynamiclib -Wl,-headerpad_max_install_names -single_module -multiply_defined suppress# $(CFLAGS) $(CPICFLAGS)
153153
SHLIB_LIBADD =
154154
## We want to ensure libR is picked up from $(R_HOME)/lib
155155
## before e.g. /usr/local/lib if a version is already installed.

0 commit comments

Comments
 (0)