File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,11 @@ ifeq ($(USE_TBB), SunOS)
113113 endif
114114endif
115115
116+ # Override arch (mainly for arm64 macOS)
117+ ifneq ("$(ARCH)",)
118+ MAKE_ARGS += $(ARCH)
119+ endif
120+
116121# Write compilation output to file, and log it if installation fails.
117122ifeq ($(VERBOSE),)
118123 MAKE_ARGS += > tbb.log 2>&1 \
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ switch(
6464
6565# define special flags for Windows
6666db <- configure_database()
67- if (Sys.info()[[" sysname" ]] == " Windows" ) {
67+ info <- as.list(Sys.info())
68+ if (info [[" sysname" ]] == " Windows" ) {
6869
6970 cygpath <- nzchar(Sys.which(" cygpath" ))
7071 fmt <- if (cygpath ) " $(shell cygpath -m \" %s\" )" else " %s"
@@ -75,6 +76,14 @@ if (Sys.info()[["sysname"]] == "Windows") {
7576
7677}
7778
79+ # detect arm64 macOS
80+ if (info [[" sysname" ]] == " Darwin" ) {
81+ if (info [[" machine" ]] == " arm64" ) {
82+ define(ARCH = " arch=arm64" )
83+ } else {
84+ define(ARCH = " " )
85+ }
86+ }
7887# use c++0x for compatibility with older compilers
7988if (getRversion() < " 4.0" ) {
8089 define(STDVER = " stdver=c++0x" )
You can’t perform that action at this time.
0 commit comments