Created
December 18, 2020 02:02
-
-
Save dantonnoriega/060ed77ff10779f41540d99c516c5d5b to your computer and use it in GitHub Desktop.
Makevars for installing data.table on Big Sur + Apple Silicon (M1; ARM)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# brew --prefix llvm | |
LLVM_LOC=/usr/local/opt/llvm | |
# brew --prefix gettext | |
GETTEXT=/usr/local/opt/gettext | |
# xcrun --show-sdk-path | |
XCBASE=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk | |
CC=$(LLVM_LOC)/bin/clang -fopenmp | |
CXX=$(LLVM_LOC)/bin/clang++ -fopenmp | |
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe | |
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe | |
# more on flags https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html | |
LDFLAGS=-L"$(LLVM_LOC)/lib" -L"$(GETTEXT)/lib" --sysroot="$(XCBASE)" | |
CPPFLAGS=-isystem "$(LLVM_LOC)/include" -isysroot "$(XCBASE)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assumes you did the hacky arm
homebrew
install: https://soffes.blog/homebrew-on-apple-silicon