File tree 3 files changed +17
-1
lines changed
3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ tbbLdFlags <- function() {
81
81
return (sprintf(fmt , asBuildPath(tbbLib )))
82
82
}
83
83
84
+ # on Aarch64 builds, use the version of TBB provided by Rtools
85
+ if (is_windows() && R.version $ arch == " aarch64" )
86
+ return (" -ltbb12 -ltbbmalloc" )
87
+
84
88
# on Mac, Windows and Solaris, we need to explicitly link (#206)
85
89
needsExplicitFlags <- is_mac() || is_windows() || (is_solaris() && ! is_sparc())
86
90
if (needsExplicitFlags ) {
Original file line number Diff line number Diff line change @@ -27,8 +27,12 @@ loadTbbLibrary <- function(name) {
27
27
28
28
.onLoad <- function (libname , pkgname ) {
29
29
30
+ tbbLibraryName <- " tbb"
31
+ if (is_windows() && R.version $ arch == " aarch64" )
32
+ tbbLibraryName <- " tbb12"
33
+
30
34
# load tbb, tbbmalloc
31
- .tbbDllInfo <<- loadTbbLibrary(" tbb " )
35
+ .tbbDllInfo <<- loadTbbLibrary(tbbLibraryName )
32
36
.tbbMallocDllInfo <<- loadTbbLibrary(" tbbmalloc" )
33
37
34
38
# load tbbmalloc_proxy, but only if requested
Original file line number Diff line number Diff line change @@ -88,6 +88,14 @@ ifeq ($(USE_TBB), Windows)
88
88
# Linker needs access to the tbb dll; otherwise you get errors such as:
89
89
# "undefined reference to `tbb::task_scheduler_init::terminate()'"
90
90
PKG_LIBS += -Ltbb/build/lib_release -ltbb -ltbbmalloc
91
+
92
+ # override for aarch64 (experimental) to use Rtools TBB
93
+ ARCH=$(shell "${R_HOME}/bin/R" --vanilla -s -e 'cat(R.version$$arch)')
94
+ ifeq "$(ARCH)" "aarch64"
95
+ TBB_LIB = ${R_TOOLS_SOFT}
96
+ TBB_INC = ${R_TOOLS_SOFT}
97
+ PKG_LIBS = -ltbb12 -ltbbmalloc
98
+ endif
91
99
92
100
endif
93
101
You can’t perform that action at this time.
0 commit comments