File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ is_windows <- function() {
33 .Platform $ OS.type == " windows"
44}
55
6+ is_mac <- function () {
7+ Sys.info()[[" sysname" ]] == " Darwin"
8+ }
9+
610is_unix <- function () {
711 .Platform $ OS.type == " unix"
812}
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ tbbLdFlags <- function() {
8181 return (sprintf(fmt , asBuildPath(tbbLib )))
8282 }
8383
84- # on Windows and Solaris, we need to explicitly link
85- needsExplicitFlags <- is_windows() || (is_solaris() && ! is_sparc())
84+ # on Mac, Windows and Solaris, we need to explicitly link (#206)
85+ needsExplicitFlags <- is_mac() || is_windows() || (is_solaris() && ! is_sparc())
8686 if (needsExplicitFlags ) {
8787 libPath <- asBuildPath(tbbLibraryPath())
8888 libFlag <- paste0(" -L" , libPath )
Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ ifneq (@COMPILER@, )
9595 MAKE_ARGS += compiler=@COMPILER@
9696endif
9797
98+ # When TBB_LIB is unset on MacOS, link to the bundled version (#206)
99+ ifeq ($(USE_TBB)$(TBB_LIB),Mac)
100+ PKG_LIBS += -Ltbb/build/lib_release -ltbb -Wl,-rpath,'@loader_path/../lib'
101+ endif
102+
98103# For Solaris detect if this is 32-bit R on x86 and if so forward that to TBB
99104ifeq ($(USE_TBB), SunOS)
100105 R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
You can’t perform that action at this time.
0 commit comments