Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 07e23e9

Browse filesBrowse files
committed
Make check clang-specific, fix downstream usage
1 parent 8d0215e commit 07e23e9
Copy full SHA for 07e23e9

File tree

Expand file treeCollapse file tree

4 files changed

+13
-5
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+13
-5
lines changed

‎inst/include/RcppParallel.h

Copy file name to clipboardExpand all lines: inst/include/RcppParallel.h
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
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
2124
# include "RcppParallel/TBB.h"
2225
#endif
2326

‎src/Makevars.in

Copy file name to clipboardExpand all lines: src/Makevars.in
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ ifeq ($(OS), Windows_NT)
2424
ARCH=$(shell "${R_HOME}/bin/R" --vanilla -s -e 'cat(R.version$$arch)')
2525
TBB_CXXFLAGS = @CXX11FLAGS@ -DTBB_NO_LEGACY=1
2626
ifeq "$(ARCH)" "aarch64"
27-
WINARM64=true
2827
PKG_CPPFLAGS += -DTBB_USE_GCC_BUILTINS
2928
TBB_CXXFLAGS += -DTBB_USE_GCC_BUILTINS
29+
CLANG_CHECK := $(shell echo | $(CC) -E -dM - | findstr __clang__)
30+
ifneq ($(CLANG_CHECK), )
31+
WINARM64_CLANG=true
32+
endif
3033
endif
3134

3235
MAKE = make
@@ -39,7 +42,7 @@ ifeq ($(OS), Windows_NT)
3942
CXXFLAGS="$(TBB_CXXFLAGS)" \
4043
PIC_KEY="@CXX11PICFLAGS@" \
4144
WARNING_SUPPRESS="" \
42-
WINARM64="$(WINARM64)" \
45+
WINARM64_CLANG="$(WINARM64_CLANG)" \
4346
$(MAKE)
4447

4548
else
@@ -86,7 +89,9 @@ ifeq ($(USE_TBB), Windows)
8689
# rtools: turn on hacks to compensate for make and shell differences rtools<=>MinGW
8790
# compiler: overwrite default (which is cl = MS compiler)
8891
MAKE_ARGS += rtools=true compiler=gcc
89-
ifneq ($(WINARM64), true)
92+
# TBB configure will detect mingw runtime with unknown arch on WINARM64_CLANG but not an
93+
# issue as we are using compiler built-ins instead of arch-specific code
94+
ifneq ($(WINARM64_CLANG), true)
9095
ifeq ($(WIN), 64)
9196
MAKE_ARGS += arch=intel64 runtime=mingw
9297
ARCH_DIR=x64/

‎src/tbb/build/Makefile.tbb

Copy file name to clipboardExpand all lines: src/tbb/build/Makefile.tbb
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ tbb.def: $(TBB.DEF) $(TBB.LST)
9393

9494
# LLVM on Windows doesn't need --version-script export
9595
# https://reviews.llvm.org/D63743
96-
ifeq (, $(WINARM64))
96+
ifeq (, $(WINARM64_CLANG))
9797
LIB_LINK_FLAGS += $(EXPORT_KEY)tbb.def
9898
endif
9999
$(TBB.DLL): tbb.def

‎src/tbb/build/Makefile.tbbmalloc

Copy file name to clipboardExpand all lines: src/tbb/build/Makefile.tbbmalloc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ tbbmalloc.def: $(MALLOC.DEF)
7676

7777
# LLVM on Windows doesn't need --version-script export
7878
# https://reviews.llvm.org/D63743
79-
ifeq (, $(WINARM64))
79+
ifeq (, $(WINARM64_CLANG))
8080
MALLOC_LINK_FLAGS += $(EXPORT_KEY)tbbmalloc.def
8181
endif
8282
$(MALLOC.DLL): tbbmalloc.def

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.