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() {
3
3
.Platform $ OS.type == " windows"
4
4
}
5
5
6
+ is_mac <- function () {
7
+ Sys.info()[[" sysname" ]] == " Darwin"
8
+ }
9
+
6
10
is_unix <- function () {
7
11
.Platform $ OS.type == " unix"
8
12
}
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ tbbLdFlags <- function() {
81
81
return (sprintf(fmt , asBuildPath(tbbLib )))
82
82
}
83
83
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())
86
86
if (needsExplicitFlags ) {
87
87
libPath <- asBuildPath(tbbLibraryPath())
88
88
libFlag <- paste0(" -L" , libPath )
Original file line number Diff line number Diff line change @@ -95,6 +95,11 @@ ifneq (@COMPILER@, )
95
95
MAKE_ARGS += compiler=@COMPILER@
96
96
endif
97
97
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
+
98
103
# For Solaris detect if this is 32-bit R on x86 and if so forward that to TBB
99
104
ifeq ($(USE_TBB), SunOS)
100
105
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