Skip to content

Commit 9a5389c

Browse files
committed
try overriding arch for arm64
1 parent ae9fc22 commit 9a5389c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/Makevars.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ ifeq ($(USE_TBB), SunOS)
113113
endif
114114
endif
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.
117122
ifeq ($(VERBOSE),)
118123
MAKE_ARGS += > tbb.log 2>&1 \

tools/config/configure.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ switch(
6464

6565
# define special flags for Windows
6666
db <- 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
7988
if (getRversion() < "4.0") {
8089
define(STDVER = "stdver=c++0x")

0 commit comments

Comments
 (0)