add jemalloc back

main
Ziyang Hu 2 years ago
parent 3843ce7218
commit 4bac04f56e

3
.gitmodules vendored

@ -10,3 +10,6 @@
[submodule "cozorocks/deps/rocksdb"] [submodule "cozorocks/deps/rocksdb"]
path = cozorocks/deps/rocksdb path = cozorocks/deps/rocksdb
url = https://github.com/facebook/rocksdb.git url = https://github.com/facebook/rocksdb.git
[submodule "cozorocks/deps/jemalloc"]
path = cozorocks/deps/jemalloc
url = https://github.com/jemalloc/jemalloc.git

@ -20,9 +20,11 @@ fn main() {
println!("cargo:rustc-link-search={}/deps/rocksdb/cmake_build/", manifest_dir); println!("cargo:rustc-link-search={}/deps/rocksdb/cmake_build/", manifest_dir);
println!("cargo:rustc-link-search={}/deps/zstd/lib/", manifest_dir); println!("cargo:rustc-link-search={}/deps/zstd/lib/", manifest_dir);
println!("cargo:rustc-link-search={}/deps/lz4/lib/", manifest_dir); println!("cargo:rustc-link-search={}/deps/lz4/lib/", manifest_dir);
println!("cargo:rustc-link-search={}/deps/jemalloc/lib/", manifest_dir);
println!("cargo:rustc-link-lib=static=zstd"); println!("cargo:rustc-link-lib=static=zstd");
println!("cargo:rustc-link-lib=static=rocksdb"); println!("cargo:rustc-link-lib=static=rocksdb");
println!("cargo:rustc-link-lib=static=lz4"); println!("cargo:rustc-link-lib=static=lz4");
println!("cargo:rustc-link-lib=static=jemalloc");
// println!("cargo:rustc-link-lib=z"); // println!("cargo:rustc-link-lib=z");
// //
// if target.contains("msvc") { // if target.contains("msvc") {
@ -33,7 +35,6 @@ fn main() {
// } // }
// //
// println!("cargo:rustc-link-lib=snappy"); // println!("cargo:rustc-link-lib=snappy");
// println!("cargo:rustc-link-lib=jemalloc");
println!("cargo:rerun-if-changed=src/bridge/mod.rs"); println!("cargo:rerun-if-changed=src/bridge/mod.rs");
println!("cargo:rerun-if-changed=bridge/bridge.h"); println!("cargo:rerun-if-changed=bridge/bridge.h");
println!("cargo:rerun-if-changed=bridge/common.h"); println!("cargo:rerun-if-changed=bridge/common.h");

@ -12,6 +12,7 @@ fi
# gflags # gflags
cd gflags cd gflags
rm -fr cmake_build
mkdir cmake_build && cd cmake_build mkdir cmake_build && cd cmake_build
cmake .. cmake ..
make -j 8 make -j 8
@ -20,13 +21,23 @@ cd ../..
# lz4 # lz4
cd lz4 cd lz4
make clean
make -j 8 make -j 8
cd .. cd ..
# zstd # zstd
cd zstd cd zstd
make clean
make -j 8
cd ..
# jemalloc
cd jemalloc
make clean
./autogen.sh --with-jemalloc-prefix=''
make -j 8 make -j 8
cd .. cd ..
# rocksdb # rocksdb
@ -42,5 +53,9 @@ cmake -DCMAKE_BUILD_TYPE=Release \
-Dlz4_LIBRARIES=${PWD}/../../lz4/lib \ -Dlz4_LIBRARIES=${PWD}/../../lz4/lib \
-Dzstd_INCLUDE_DIRS=${PWD}/../../zstd/lib \ -Dzstd_INCLUDE_DIRS=${PWD}/../../zstd/lib \
-Dzstd_LIBRARIES=${PWD}/../../zstd/lib \ -Dzstd_LIBRARIES=${PWD}/../../zstd/lib \
-DJeMalloc_INCLUDE_DIRS=${PWD}/../../jemalloc/include \
-DJeMalloc_LIBRARIES=${PWD}/../../jemalloc/lib \
-DCMAKE_CXX_STANDARD=20 -DWITH_GFLAGS=1 -DWITH_LZ4=1 -DWITH_ZSTD=1 -DUSE_RTTI=1 -DWITH_TESTS=0 \ -DCMAKE_CXX_STANDARD=20 -DWITH_GFLAGS=1 -DWITH_LZ4=1 -DWITH_ZSTD=1 -DUSE_RTTI=1 -DWITH_TESTS=0 \
-DWITH_BENCHMARK_TOOLS=0 -DWITH_CORE_TOOLS=0 -DWITH_TOOLS=0 .. -DWITH_JEMALLOC=1 -DWITH_BENCHMARK_TOOLS=0 -DWITH_CORE_TOOLS=0 -DWITH_TOOLS=0 ..
make -j 8
cd ..

@ -0,0 +1 @@
Subproject commit 54eaed1d8b56b1aa528be3bdd1877e59c56fa90c
Loading…
Cancel
Save