Skip to content

Commit aa4ced2

Browse files
committed
tweaks
1 parent 686f90e commit aa4ced2

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

tools/config/configure.R

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,27 @@ define(
211211
TBB_NAME = tbbName
212212
)
213213

214-
# set TBB_RPATH
215-
if (!is.na(tbbLib)) {
216-
define(PKG_LIBS = "-Wl,-L\"$(TBB_LIB)\" @TBB_RPATH@ -l$(TBB_NAME) -ltbbmalloc")
217-
define(TBB_RPATH = sprintf("-Wl,-rpath,%s", shQuote(tbbLib)))
214+
# set PKG_LIBS
215+
pkgLibs <- if (!is.na(tbbLib)) {
216+
217+
c(
218+
"-Wl,-L\"$(TBB_LIB)\"",
219+
sprintf("-Wl,-rpath,%s", shQuote(tbbLib)),
220+
"-l$(TBB_NAME)",
221+
"-ltbbmalloc"
222+
)
223+
218224
} else {
219-
define(PKG_LIBS = "@TBB_RPATH@ -l$(TBB_NAME) -ltbbmalloc")
220-
define(TBB_RPATH = "")
225+
226+
c(
227+
"-Wl,-Ltbb/build/lib_release",
228+
"-l$(TBB_NAME)",
229+
"-ltbbmalloc"
230+
)
231+
221232
}
233+
234+
define(PKG_LIBS = paste(pkgLibs, collapse = " "))
222235

223236
# now, set up PKG_CPPFLAGS
224237
if (!is.na(tbbLib)) {
@@ -230,7 +243,7 @@ if (!is.na(tbbLib)) {
230243

231244
# macOS needs some extra flags set
232245
if (Sys.info()[["sysname"]] == "Darwin") {
233-
define(PKG_LIBS_EXTRA = "-Ltbb/build/lib_release -ltbb -Wl,-rpath,\"@loader_path/../lib\"")
246+
define(PKG_LIBS_EXTRA = "-Wl,-rpath,\"@loader_path/../lib\"")
234247
} else {
235248
define(PKG_LIBS_EXTRA = "")
236249
}

0 commit comments

Comments
 (0)