Skip to content

Commit

Permalink
enable openmp on macos_arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
vpisarev committed Apr 1, 2021
1 parent 850c6d3 commit ffc41ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ else
LDFLAGS += -Xclang -fopenmp
LDLIBS += -L./runtime/lib/macos_x64/ -lomp
endif
#ifeq ($(UNAME_M),arm64)
# CFLAGS += -Xclang -fopenmp
# LDLIBS += -L./runtime/lib/macos/x64/ -lmimalloc -lomp
#endif
ifeq ($(UNAME_M),arm64)
CFLAGS += -Xclang -fopenmp
LDLIBS += -L./runtime/lib/macos_arm64/ -lomp
endif
endif
ifeq ($(UNAME_S),Linux)
CFLAGS += -fopenmp
Expand Down
4 changes: 3 additions & 1 deletion compiler/Compiler.fx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ fun run_cc(cmods: C_form.cmodule_t list, ficus_root: string) {
" " + omp_cflags + omp_lib
)
} else if osinfo.contains ("arm64") {
("", "", "")
("macos_arm64", omp_cflags,
" " + omp_cflags + omp_lib
)
} else {
("", "", "")
}
Expand Down
Binary file added runtime/lib/macos_arm64/libomp.a
Binary file not shown.

0 comments on commit ffc41ee

Please sign in to comment.