使用clang编译比特股
原因:clang比gcc编译的快,i5-6400 4核心 4G内存 ubuntu16.04下比较,
gcc编译约要8小时
clang编译约20分钟
一 下载clang的预编译的版本
wget http://releases.llvm.org/5.0.0/clang+llvm-5.0.0-linux-x86_64-ubuntu16.04.tar.xz
注意:需下载3.3及以后版本,官方的github CMakeLists.txt警告说的
message(FATAL_ERROR "Clang version must be at least 3.3!")
二 解压clang并释放到/usr
tar -xvf clang+llvm-5.0.0-linux-x86_64-ubuntu16.04.tar.xz
cd clang+llvm-5.0.0-linux-x86_64-ubuntu16.04
sudo cp -R * /usr/
三 下载比特股源码编译
git clone https://github.com/bitshares/bitshares-core
cd bitshares-core
git submodule update --init --recursive
CC=clang CXX=clang++ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo .
make witness_node cli_wallet -j4 //只编译见证节点和钱包节点
Congratulations @baidang! You have received a personal award!
1 Year on Steemit
Click on the badge to view your Board of Honor.
Congratulations @baidang! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!