Skip to content

Commit 6e20b49

Browse files
authored
use configure-detected TBB_LIB during install.libs (#254)
At the install-libs phase, TBB_LIB was read only from the environment, which is typically unset there -- configure communicates it via make variables, not the environment. On Windows, where configure detects the Rtools copy of TBB, this meant .install.libs() wrongly took the bundled-TBB branch, shipping any stale artifacts present in tbb/build/lib_release (e.g. TBB DLLs built by RcppParallel 5.x in a long-lived working tree, masking the tbb stub library). On Linux and macOS, system-TBB builds silently shipped no libraries at all. Fall back to the configure-detected value from tbb-autodetected.R when the environment variable is unset.
1 parent a269874 commit 6e20b49

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/install.libs.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,15 @@ if (identical(args, "build")) {
319319
useBundledTbb()
320320
}
321321
} else {
322+
323+
# prefer the configure-detected TBB_LIB when the environment variable
324+
# is unset; otherwise, e.g. on Windows (where configure detects the
325+
# Rtools copy of TBB), we'd wrongly take the bundled-TBB branch below,
326+
# and ship any stale artifacts present in tbb/build/lib_release
322327
source("../R/tbb-autodetected.R")
328+
if (!nzchar(tbbLib))
329+
tbbLib <- TBB_LIB
330+
323331
.install.libs(tbbLib)
332+
324333
}

0 commit comments

Comments
 (0)