Skip to content

Commit 8d0215e

Browse files
committed
Add winarm64 flags to Rcpp
1 parent 4fe07af commit 8d0215e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/tbb.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@ tbbCxxFlags <- function() {
4949
flags <- character()
5050

5151
# opt-in to TBB on Windows
52-
if (is_windows())
52+
if (is_windows()) {
5353
flags <- c(flags, "-DRCPP_PARALLEL_USE_TBB=1")
54+
if (R.version$arch == "aarch64") {
55+
# TBB does not have assembly code for Windows ARM64
56+
# so we need to use compiler builtins
57+
flags <- c(flags, "-DTBB_USE_GCC_BUILTINS")
58+
}
59+
}
5460

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

0 commit comments

Comments
 (0)