diff --git a/R/tbb.R b/R/tbb.R index ac1050f3..3d8fbb32 100644 --- a/R/tbb.R +++ b/R/tbb.R @@ -24,7 +24,7 @@ tbbLibraryPath <- function(name = NULL) { # form library names tbbLibNames <- list( "Darwin" = paste0("lib", name, ".dylib"), - "Windows" = paste0( name, ".dll"), + "Windows" = paste0("lib", name, c("12", ""), ".a"), "SunOS" = paste0("lib", name, ".so"), "Linux" = paste0("lib", name, c(".so.2", ".so")) ) @@ -58,14 +58,6 @@ tbbCxxFlags <- function() { return("-DRCPP_PARALLEL_USE_TBB=0") flags <- c("-DRCPP_PARALLEL_USE_TBB=1") - - # TBB does not have assembly code for Windows ARM64 - # so we need to use compiler builtins - if (TBB_ENABLED && is_windows()) { - if (R.version$arch == "aarch64") { - flags <- c(flags, "-DTBB_USE_GCC_BUILTINS") - } - } # if TBB_INC is set, apply those library paths tbbInc <- Sys.getenv("TBB_INC", unset = TBB_INC) diff --git a/R/zzz.R b/R/zzz.R index 28b50d33..54374e09 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -11,7 +11,10 @@ .tbbMallocProxyDllInfo <- NULL loadTbbLibrary <- function(name) { - + # TBB is statically linked on Windows + if (is_windows()) { + return(NULL) + } path <- tbbLibraryPath(name) if (is.null(path)) return(NULL) diff --git a/inst/include/RcppParallel.h b/inst/include/RcppParallel.h index c7fdf0bc..87d6eb5c 100644 --- a/inst/include/RcppParallel.h +++ b/inst/include/RcppParallel.h @@ -18,9 +18,6 @@ #endif #if RCPP_PARALLEL_USE_TBB -# if defined(WINNT) && defined(__aarch64__) && !defined(TBB_USE_GCC_BUILTINS) -# define TBB_USE_GCC_BUILTINS 1 -# endif # include "RcppParallel/TBB.h" #endif