-
Notifications
You must be signed in to change notification settings - Fork 7
/
build_debug.sh
29 lines (22 loc) · 1.01 KB
/
build_debug.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/sh
#脚本当前路径
scriptDir=$(cd $(dirname $0); pwd)
echo ${scriptDir};
# 可选编译第三方库libiouring
# git submodule update --init --recursive
# cd $scriptDir/src/thirdparty/liburing/
# ./configure --prefix=../../../../ --libdir=../../../../lib/ --includedir=../../../../include/
# make CFLAGS=-std=gnu99 && make install
# 编译 toolbox
cd $scriptDir
if [ ! -d build ]; then
mkdir build
else
echo build exist
fi
cd $scriptDir/build
#cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GPERF_TOOLS_CPU=OFF -DCMAKE_GPERF_TOOLS_HEAP=OFF -DCMAKE_USE_LIBIOURING=OFF -DCMAKE_C_COMPILER=clang-3.8 -DCMAKE_CXX_COMPILER=clang++-3.8 -DGCC_TOOLCHAIN="/usr/lib/gcc/myfaketoolchain" ..
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GPERF_TOOLS_CPU=OFF -DCMAKE_GPERF_TOOLS_HEAP=OFF -DCMAKE_JEMALLOC=ON -DCMAKE_USE_LIBIOURING=OFF -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
# clangd tool
cp compile_commands.json ../compile_commands.json
make -j8