Skip to content

Commit e4e33f4

Browse files
authored
Remove obsolete flag for WINARM64, fix TBB library lookup on Windows (#241)
* Remove unnecessary flag for WINARM64 * Fix TBB library lookup
1 parent 49be421 commit e4e33f4

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

R/tbb.R

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tbbLibraryPath <- function(name = NULL) {
2424
# form library names
2525
tbbLibNames <- list(
2626
"Darwin" = paste0("lib", name, ".dylib"),
27-
"Windows" = paste0( name, ".dll"),
27+
"Windows" = paste0("lib", name, c("12", ""), ".a"),
2828
"SunOS" = paste0("lib", name, ".so"),
2929
"Linux" = paste0("lib", name, c(".so.2", ".so"))
3030
)
@@ -58,14 +58,6 @@ tbbCxxFlags <- function() {
5858
return("-DRCPP_PARALLEL_USE_TBB=0")
5959

6060
flags <- c("-DRCPP_PARALLEL_USE_TBB=1")
61-
62-
# TBB does not have assembly code for Windows ARM64
63-
# so we need to use compiler builtins
64-
if (TBB_ENABLED && is_windows()) {
65-
if (R.version$arch == "aarch64") {
66-
flags <- c(flags, "-DTBB_USE_GCC_BUILTINS")
67-
}
68-
}
6961

7062
# if TBB_INC is set, apply those library paths
7163
tbbInc <- Sys.getenv("TBB_INC", unset = TBB_INC)

R/zzz.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
.tbbMallocProxyDllInfo <- NULL
1212

1313
loadTbbLibrary <- function(name) {
14-
14+
# TBB is statically linked on Windows
15+
if (is_windows()) {
16+
return(NULL)
17+
}
1518
path <- tbbLibraryPath(name)
1619
if (is.null(path))
1720
return(NULL)

inst/include/RcppParallel.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
#endif
1919

2020
#if RCPP_PARALLEL_USE_TBB
21-
# if defined(WINNT) && defined(__aarch64__) && !defined(TBB_USE_GCC_BUILTINS)
22-
# define TBB_USE_GCC_BUILTINS 1
23-
# endif
2421
# include "RcppParallel/TBB.h"
2522
#endif
2623

0 commit comments

Comments
 (0)