Created
December 8, 2016 04:18
-
-
Save sonsongithub/b836d8cf7d81b600e7f0fe18fa5f261a to your computer and use it in GitHub Desktop.
Demitasse build script for macOS by sonson
This file contains 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
# | |
# Demitasse build script for macOS by sonson | |
# | |
# setup library using brew | |
brew install cmake git bison protobuf flatbuffers libpng | |
# | |
# llvm | |
# | |
# clone llvm | |
git clone http://llvm.org/git/llvm.git | |
(cd llvm/tools/; git clone http://llvm.org/git/clang.git) | |
(cd llvm/projects/; git clone http://llvm.org/git/compiler-rt.git) | |
(cd llvm/projects/; git clone http://llvm.org/git/openmp.git) | |
(cd llvm/projects/; git clone http://llvm.org/git/libcxx.git) | |
(cd llvm/projects/; git clone http://llvm.org/git/libcxxabi.git) | |
# check out llvm branches | |
(cd llvm; git checkout -b release_39 origin/release_39) | |
(cd llvm/tools/clang; git checkout -b release_39 origin/release_39) | |
(cd llvm/projects/compiler-rt; git checkout -b release_39 origin/release_39) | |
(cd llvm/projects/openmp; git checkout -b release_39 origin/release_39) | |
(cd llvm/projects/libcxx; git checkout -b release_39 origin/release_39) | |
(cd llvm/projects/libcxxabi; git checkout -b release_39 origin/release_39) | |
# build and install llvm | |
mkdir build_llvm | |
(cd build_llvm; cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64"; make -j 4) | |
(cd build_llvm; sudo make install) | |
# export llvm path | |
export LLVM_HOME=/usr/local | |
# | |
# ispc | |
# | |
# setup bison | |
brew link --force bison | |
# clone source code | |
git clone https://github.com/DensoITLab/ispc | |
# build ispc | |
(cd ispc; git checkout aarch64) | |
# patch Makefile to build for ARM CPU | |
(cd ispc; sed -i -e "s/ARM_ENABLED=0/ARM_ENABLED=1/" Makefile;) | |
(cd ispc; make; sudo cp ispc /usr/local/bin) | |
# unlink build | |
brew unlink --force bison | |
# | |
# Demitasse | |
# | |
git clone https://github.com/DensoITLab/Demitasse | |
(cd Demitasse; git checkout fix20161208) | |
mkdir build_Demitasse | |
# build and test | |
(cd build_Demitasse; cmake ../Demitasse; make -j 4; make test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment