Skip to content

Commit

Permalink
Auto-build tiflash proxy using cmake (pingcap#3960)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 authored Jan 30, 2022
1 parent 9026220 commit e7612d9
Show file tree
Hide file tree
Showing 17 changed files with 169 additions and 151 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(TIFLASH_ENABLE_LLVM_DEVELOPMENT)
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(ENV{LD_LIBRARY_PATH} "${CMAKE_PREFIX_PATH}/lib:${CMAKE_PREFIX_PATH}/lib/x86_64-unknown-linux-gnu/:${CMAKE_PREFIX_PATH}/lib/aarch64-unknown-linux-gnu/")
set(CMAKE_INSTALL_RPATH "${TiFlash_SOURCE_DIR}/libs/libtiflash-proxy;$ORIGIN/;${CMAKE_PREFIX_PATH}/lib;${CMAKE_PREFIX_PATH}/lib/x86_64-unknown-linux-gnu/;${CMAKE_PREFIX_PATH}/lib/aarch64-unknown-linux-gnu/")
set(CMAKE_INSTALL_RPATH "$ORIGIN/;${CMAKE_PREFIX_PATH}/lib;${CMAKE_PREFIX_PATH}/lib/x86_64-unknown-linux-gnu/;${CMAKE_PREFIX_PATH}/lib/aarch64-unknown-linux-gnu/")
endif()

message (STATUS "Using CXX=${CMAKE_CXX_COMPILER}, ver=${CMAKE_CXX_COMPILER_VERSION};CC=${CMAKE_C_COMPILER}, ver=${CMAKE_C_COMPILER_VERSION}")
Expand Down Expand Up @@ -328,7 +328,7 @@ include (cmake/find_grpc.cmake)
include (cmake/find_kvproto.cmake)
include (cmake/find_tipb.cmake)
include (cmake/find_prometheus.cmake)
include (cmake/find_raftstore_proxy.cmake)
include (cmake/find_tiflash_proxy.cmake)
include (cmake/find_xxhash.cmake)

include (cmake/find_contrib_lib.cmake)
Expand Down
67 changes: 35 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,56 @@

- CMake 3.13.2+
- clang-format 12.0.0+

### Recommended Compiler

- (macOS) Apple Clang 12.0.0
- (Linux) Clang 13.0.0
- Python 3.0+
- Rust
- `curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain nightly`
- `source $HOME/.cargo/env`
- Apple Clang 12.0.0 for MacOS
- Clang 13.0.0 for Linux

### Checkout Source Code

```
# WORKSPACE
$ git clone --recursive https://github.com/pingcap/tics.git
```
### TiFlash on MacOS

#### Build tiflash-proxy
```
# WORKSPACE/tics
$ pushd contrib/tiflash-proxy
$ make release
$ popd
$ mkdir -p libs/libtiflash-proxy
$ cp contrib/tiflash-proxy/target/release/libtiflash_proxy* libs/libtiflash-proxy
```
### Build Options

TiFlash has several build options to tweak the build for different purposes.
**Basically all these options have proper default values so you shouldn't experience troubles if you skip all this paragraph.**

- `CMAKE_BUILD_TYPE`: `DEBUG` / `RELWITHDEBINFO` (default) / `RELEASE`
- `ENABLE_TESTS`: `ON` / `OFF` (default)
- `USE_INTERNAL_GRPC_LIBRARY` / `USE_INTERNAL_PROTOBUF_LIBRARY`: `TRUE` (default) / `FALSE`
- One may want to use prebuilt/system-wide gRPC or Protobuf, set them to `FALSE` so CMake will try to find prebuilt gRPC and Protobuf instead of build the ones from the submodules.
- Option `PREBUILT_LIBS_ROOT` can be used to guide CMake's searching for them.
- Note that though these two options can be set individually, it is recommended to set them both because we won't guarantee the compatibility between gRPC and Protobuf in arbitrary versions.
- `USE_INTERNAL_TIFLASH_PROXY`: `TRUE` (default) / `FALSE`
- One may want to use external TiFlash proxy, e.g., if he is developing TiFlash proxy (https://github.com/pingcap/tidb-engine-ext) together with TiFlash.
- Usually need to be combined with `PREBUILT_LIBS_ROOT="<PATH_TO_YOUR_OWN_TIFLASH_PROXY_REPO>..."`.
- It assumes the `<PATH_TO_YOUR_OWN_TIFLASH_PROXY_REPO>` has the same directory structure as the TiFlash proxy submodule in TiFlash, i.e.:
- Header files are under directory `<PATH_TO_YOUR_OWN_TIFLASH_PROXY_REPO>/raftstore-proxy/ffi/src`.
- Built library is under directory `<PATH_TO_YOUR_OWN_TIFLASH_PROXY_REPO>/target/release`.
- `PREBUILT_LIBS_ROOT`: Paths for CMake to search for prebuilt/system-wide libraries
- Can be specified with multiple values, seperated by `;`.

These options apply to all the following platforms, take them as needed, and at your own risk.

### TiFlash on MacOS

#### Build TiFlash
```
# WORKSPACE/tics
$ rm -rf build
$ mkdir -p build
$ pushd build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=1 # default build type: RELWITHDEBINFO
$ cmake ..
$ make tiflash
$ popd
```
Now you will get TiFlash binary under WORKSPACE/tics/build/dbms/src/Server/tiflash.
Now you will get TiFlash binary under `WORKSPACE/tics/build/dbms/src/Server/tiflash`.

### TiFlash with LLVM (Linux)
### TiFlash on Linux

TiFlash compiles in full LLVM environment (libc++/libc++abi/libunwind/compiler-rt) by default. To quickly setup a LLVM environment, you can use TiFlash Development Environment (see `release-centos7-llvm/env`) (for faster access of precompiled package in internal network, you can use [this link](http://fileserver.pingcap.net/download/development/tiflash-env/v1.0.0/tfilash-env-x86_64.tar.xz)).

Expand All @@ -56,30 +69,20 @@ make tiflash-env-$(uname -m).tar.xz
```
Then copy and uncompress `tiflash-env-$(uname -m).tar.xz` to a suitable place.

#### Compile TiFlash Proxy

To compile `libtiflash-proxy.so`, you can first enter the development environment with the loader and then simply invoke the makefile to build. For example, the following commands will do the job:
```
cd /path/to/tiflash/env
./loader
cd /path/to/tiflash/proxy/src/dir
make release
```

#### Compile TiFlash

Similarly, you can simply enter the env to compile and run tiflash:
You can simply enter the env to compile and run tiflash:
```
cd /path/to/tiflash-env
./loader
cd /your/build/dir
cmake /path/to/tiflash/src/dir -GNinja -DENABLE_TESTS=ON # also build gtest executables
cmake /path/to/tiflash/src/dir -GNinja
ninja
```

Now you will get TiFlash binary under `WORKSPACE/tics/build/dbms/src/Server/tiflash`.

#### Develop TiFlash
#### IDE Support
Because all shared libs are shipped with `tiflash-env` and you may not add those libs to your system loader config, you may experience difficulties running executables compiled by `tiflash-env` with an IDE like CLion or VSCode. To make life easier, we provide an option `TIFLASH_ENABLE_LLVM_DEVELOPMENT`, which helps you to setup rpaths automatically so that you can run them without entering the env. To do so, you can use the following commands (or setup your IDE toolchain with the flags):
```
cmake /path/to/tiflash/src/dir \
Expand Down
20 changes: 12 additions & 8 deletions cmake/find_grpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# You can set USE_INTERNAL_GRPC_LIBRARY to OFF to force using the external gRPC framework, which should be installed in the system in this case.
# The external gRPC framework can be installed in the system by running
# sudo apt-get install libgrpc++-dev protobuf-compiler-grpc
option(USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled. (Experimental. Set to OFF on your own risk)" ${NOT_UNBUNDLED})
option(USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled. (Experimental. Set to FALSE on your own risk)" ${NOT_UNBUNDLED})

if(NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/grpc/CMakeLists.txt")
if(USE_INTERNAL_GRPC_LIBRARY)
Expand All @@ -26,16 +26,20 @@ if(NOT USE_INTERNAL_GRPC_LIBRARY)
endif()
endif()

if(NOT EXTERNAL_GRPC_LIBRARY_FOUND AND NOT MISSING_INTERNAL_GRPC_LIBRARY)
set(gRPC_INCLUDE_DIRS "${TiFlash_SOURCE_DIR}/contrib/grpc/include")
set(gRPC_LIBRARIES grpc grpc++)
set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)
if(NOT EXTERNAL_GRPC_LIBRARY_FOUND)
if(NOT MISSING_INTERNAL_GRPC_LIBRARY)
set(gRPC_INCLUDE_DIRS "${TiFlash_SOURCE_DIR}/contrib/grpc/include")
set(gRPC_LIBRARIES grpc grpc++)
set(gRPC_CPP_PLUGIN $<TARGET_FILE:grpc_cpp_plugin>)

include("${TiFlash_SOURCE_DIR}/contrib/grpc-cmake/protobuf_generate_grpc.cmake")
include("${TiFlash_SOURCE_DIR}/contrib/grpc-cmake/protobuf_generate_grpc.cmake")

set(USE_INTERNAL_GRPC_LIBRARY 1)
set(USE_INTERNAL_GRPC_LIBRARY 1)
else()
message(FATAL_ERROR "Can't find gRPC library")
endif()
endif()

set(gRPC_FOUND TRUE)

message(STATUS "Using gRPC: ${gRPC_VERSION} : ${gRPC_INCLUDE_DIRS}, ${gRPC_LIBRARIES}, ${gRPC_CPP_PLUGIN}")
message(STATUS "Using gRPC: ${USE_INTERNAL_GRPC_LIBRARY} : ${gRPC_VERSION} : ${gRPC_INCLUDE_DIRS}, ${gRPC_LIBRARIES}, ${gRPC_CPP_PLUGIN}")
22 changes: 13 additions & 9 deletions cmake/find_protobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# You can set USE_INTERNAL_PROTOBUF_LIBRARY to OFF to force using the external protobuf library, which should be installed in the system in this case.
# The external protobuf library can be installed in the system by running
# sudo apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev
option(USE_INTERNAL_PROTOBUF_LIBRARY "Set to FALSE to use system protobuf instead of bundled. (Experimental. Set to OFF on your own risk)" ${NOT_UNBUNDLED})
option(USE_INTERNAL_PROTOBUF_LIBRARY "Set to FALSE to use system protobuf instead of bundled. (Experimental. Set to FALSE on your own risk)" ${NOT_UNBUNDLED})

if(NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/protobuf/cmake/CMakeLists.txt")
if(USE_INTERNAL_PROTOBUF_LIBRARY)
Expand All @@ -26,15 +26,19 @@ if(NOT USE_INTERNAL_PROTOBUF_LIBRARY)
endif()
endif()

if(NOT EXTERNAL_PROTOBUF_LIBRARY_FOUND AND NOT MISSING_INTERNAL_PROTOBUF_LIBRARY)
set(Protobuf_INCLUDE_DIR "${TiFlash_SOURCE_DIR}/contrib/protobuf/src")
set(Protobuf_LIBRARY libprotobuf)
set(Protobuf_PROTOC_EXECUTABLE "$<TARGET_FILE:protoc>")
set(Protobuf_PROTOC_LIBRARY libprotoc)
if(NOT EXTERNAL_PROTOBUF_LIBRARY_FOUND)
if(NOT MISSING_INTERNAL_PROTOBUF_LIBRARY)
set(Protobuf_INCLUDE_DIR "${TiFlash_SOURCE_DIR}/contrib/protobuf/src")
set(Protobuf_LIBRARY libprotobuf)
set(Protobuf_PROTOC_EXECUTABLE "$<TARGET_FILE:protoc>")
set(Protobuf_PROTOC_LIBRARY libprotoc)

include("${TiFlash_SOURCE_DIR}/contrib/protobuf-cmake/protobuf_generate.cmake")
include("${TiFlash_SOURCE_DIR}/contrib/protobuf-cmake/protobuf_generate.cmake")

set(USE_INTERNAL_PROTOBUF_LIBRARY 1)
set(USE_INTERNAL_PROTOBUF_LIBRARY 1)
else()
message(FATAL_ERROR "Can't find protobuf library")
endif()
endif()

if(OS_FREEBSD AND SANITIZE STREQUAL "address")
Expand All @@ -47,4 +51,4 @@ if(OS_FREEBSD AND SANITIZE STREQUAL "address")
endif()
endif()

message(STATUS "Using protobuf: ${Protobuf_VERSION} : ${Protobuf_INCLUDE_DIR}, ${Protobuf_LIBRARY}, ${Protobuf_PROTOC_EXECUTABLE}")
message(STATUS "Using protobuf: ${USING_INTERNAL_PROTOBUF_LIBRARY} : ${Protobuf_VERSION} : ${Protobuf_INCLUDE_DIR}, ${Protobuf_LIBRARY}, ${Protobuf_PROTOC_EXECUTABLE}")
16 changes: 0 additions & 16 deletions cmake/find_raftstore_proxy.cmake

This file was deleted.

38 changes: 38 additions & 0 deletions cmake/find_tiflash_proxy.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
option(USE_INTERNAL_TIFLASH_PROXY "Set to FALSE to use external tiflash proxy instead of bundled. (Experimental. Set to FALSE on your own risk)" ${NOT_UNBUNDLED})

if(NOT EXISTS "${TiFlash_SOURCE_DIR}/contrib/tiflash-proxy/Makefile")
if(USE_INTERNAL_TIFLASH_PROXY)
message(WARNING "submodule contrib/tiflash-proxy is missing. to fix try run: \n git submodule update --init")
message(WARNING "Can't use internal tiflash proxy")
set(USE_INTERNAL_TIFLASH_PROXY 0)
endif()
set(MISSING_INTERNAL_TIFLASH_PROXY 1)
endif()

if(NOT USE_INTERNAL_TIFLASH_PROXY)
find_path(TIFLASH_PROXY_INCLUDE_DIR NAMES RaftStoreProxyFFI/ProxyFFI.h PATH_SUFFIXES raftstore-proxy/ffi/src)
find_library(TIFLASH_PROXY_LIBRARY NAMES tiflash_proxy PATH_SUFFIXES PATH_SUFFIXES target/release)
if(NOT TIFLASH_PROXY_INCLUDE_DIR)
message(WARNING "Can't find external tiflash proxy include dir")
set(EXTERNAL_TIFLASH_PROXY_FOUND 0)
elseif(NOT TIFLASH_PROXY_LIBRARY)
message(WARNING "Can't find external tiflash proxy library")
set(EXTERNAL_TIFLASH_PROXY_FOUND 0)
else()
set(EXTERNAL_TIFLASH_PROXY_FOUND 1)
endif()
endif()

if(NOT EXTERNAL_TIFLASH_PROXY_FOUND)
if(NOT MISSING_INTERNAL_TIFLASH_PROXY)
set(TIFLASH_PROXY_INCLUDE_DIR "${TiFlash_SOURCE_DIR}/contrib/tiflash-proxy/raftstore-proxy/ffi/src")
set(TIFLASH_PROXY_LIBRARY libtiflash_proxy)
set(USE_INTERNAL_TIFLASH_PROXY 1)
else()
message(FATAL_ERROR "Can't find tiflash proxy")
endif()
endif()

set(TIFLASH_PROXY_FOUND TRUE)

message(STATUS "Using tiflash proxy: ${USE_INTERNAL_TIFLASH_PROXY} : ${TIFLASH_PROXY_INCLUDE_DIR}, ${TIFLASH_PROXY_LIBRARY}")
4 changes: 4 additions & 0 deletions contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ set (ENABLE_TESTS ${_save})
# -------
add_subdirectory (tipb/cpp)

if (USE_INTERNAL_TIFLASH_PROXY)
add_subdirectory (tiflash-proxy-cmake)
endif ()

# TODO: remove tcmalloc
if (ENABLE_TCMALLOC AND USE_INTERNAL_GPERFTOOLS_LIBRARY)
add_subdirectory (libtcmalloc)
Expand Down
17 changes: 17 additions & 0 deletions contrib/tiflash-proxy-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set(_TIFLASH_PROXY_SOURCE_DIR "${TiFlash_SOURCE_DIR}/contrib/tiflash-proxy")
set(_TIFLASH_PROXY_LIBRARY "${_TIFLASH_PROXY_SOURCE_DIR}/target/release/${CMAKE_SHARED_LIBRARY_PREFIX}tiflash_proxy${CMAKE_SHARED_LIBRARY_SUFFIX}")
file(GLOB_RECURSE _TIFLASH_PROXY_SRCS "${_TIFLASH_PROXY_SOURCE_DIR}/*.rs")

add_custom_command(OUTPUT ${_TIFLASH_PROXY_LIBRARY}
COMMENT "Building tiflash proxy"
COMMAND make release
VERBATIM
WORKING_DIRECTORY ${_TIFLASH_PROXY_SOURCE_DIR}
DEPENDS "${_TIFLASH_PROXY_SRCS}" "${_TIFLASH_PROXY_SOURCE_DIR}/Cargo.lock" "${_TIFLASH_PROXY_SOURCE_DIR}/rust-toolchain")

add_custom_target(tiflash_proxy ALL
DEPENDS ${_TIFLASH_PROXY_LIBRARY})

add_library(libtiflash_proxy SHARED IMPORTED GLOBAL)
set_target_properties(libtiflash_proxy PROPERTIES IMPORTED_LOCATION ${_TIFLASH_PROXY_LIBRARY})
add_dependencies(libtiflash_proxy tiflash_proxy)
2 changes: 1 addition & 1 deletion dbms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ else ()
install (TARGETS dbms LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT clickhouse)
endif ()

target_include_directories(dbms PUBLIC "${TIFLASH_PROXY_FFI_SRC}")
target_include_directories(dbms PUBLIC "${TIFLASH_PROXY_INCLUDE_DIR}")

if (CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE" OR CMAKE_BUILD_TYPE_UC STREQUAL "RELWITHDEBINFO" OR CMAKE_BUILD_TYPE_UC STREQUAL "MINSIZEREL")
# Won't generate debug info for files with heavy template instantiation to achieve faster linking and lower size.
Expand Down
1 change: 1 addition & 0 deletions release-centos7-llvm/scripts/build-proxy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

# TODO: We should move these things into tiflash proxy's own build script rather than do them in main tiflash project.
# TiFlash-Proxy Building script
# Copyright PingCAP, Inc
# THIS SCRIPT SHOULD ONLY BE INVOKED IN DOCKER
Expand Down
1 change: 1 addition & 0 deletions release-centos7-llvm/scripts/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ SRCPATH=$(cd ${SCRIPTPATH}/../..; pwd -P)
install_dir="$SRCPATH/release-centos7-llvm/tiflash"
if [[ -d "$install_dir" ]]; then rm -rf "${install_dir:?}"/*; else mkdir -p "$install_dir"; fi

# TODO: Calling this script won't be necessary when we move things within `build-proxy.sh` into tiflash proxy's own build script.
${SCRIPTPATH}/build-proxy.sh
${SCRIPTPATH}/build-tiflash-release.sh "" "${CMAKE_PREFIX_PATH}"
22 changes: 15 additions & 7 deletions release-centos7-llvm/scripts/build-tiflash-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,29 @@ else
fi
ccache -z

rm -rf ${SRCPATH}/libs/libtiflash-proxy
mkdir -p ${SRCPATH}/libs/libtiflash-proxy
# Download prebuilt tiflash proxy to accelerate CI build.
rm -rf ${SRCPATH}/contrib/tiflash-proxy/target/release
mkdir -p ${SRCPATH}/contrib/tiflash-proxy/target/release

cd ${SRCPATH}/contrib/tiflash-proxy
proxy_git_hash=$(git log -1 --format="%H")
curl -o "${SRCPATH}/libs/libtiflash-proxy/libtiflash_proxy.so" \
curl -o "${SRCPATH}/contrib/tiflash-proxy/target/release/libtiflash_proxy.so" \
http://fileserver.pingcap.net/download/builds/pingcap/tiflash-proxy/${proxy_git_hash}-llvm/libtiflash_proxy.so
proxy_size=$(ls -l "${SRCPATH}/libs/libtiflash-proxy/libtiflash_proxy.so" | awk '{print $5}')
proxy_size=$(ls -l "${SRCPATH}/contrib/tiflash-proxy/target/release/libtiflash_proxy.so" | awk '{print $5}')
min_size=$((102400))
# TODO: Should build tiflash proxy along with tiflash if downloaded one is problematic.
if [[ ${proxy_size} -lt ${min_size} ]]; then
echo "try to build libtiflash_proxy.so"
export PATH=$PATH:$HOME/.cargo/bin
rm -f target/release/libtiflash_proxy.so
bash "${SCRIPTPATH}/build-proxy.sh"
echo "try to upload libtiflash_proxy.so"
cd target/release
curl -F builds/pingcap/tiflash-proxy/${proxy_git_hash}-llvm/libtiflash_proxy.so=@libtiflash_proxy.so http://fileserver.pingcap.net/upload
curl -o "${SRCPATH}/libs/libtiflash-proxy/libtiflash_proxy.so" http://fileserver.pingcap.net/download/builds/pingcap/tiflash-proxy/${proxy_git_hash}-llvm/libtiflash_proxy.so
curl -o "${SRCPATH}/contrib/tiflash-proxy/target/release/libtiflash_proxy.so" http://fileserver.pingcap.net/download/builds/pingcap/tiflash-proxy/${proxy_git_hash}-llvm/libtiflash_proxy.so
fi

chmod 0731 "${SRCPATH}/libs/libtiflash-proxy/libtiflash_proxy.so"
chmod 0731 "${SRCPATH}/contrib/tiflash-proxy/target/release/libtiflash_proxy.so"

BUILD_DIR="$SRCPATH/release-centos7-llvm/build-release"
rm -rf ${BUILD_DIR}
Expand All @@ -136,6 +139,8 @@ cmake "$SRCPATH" \
-DCMAKE_AR="/usr/local/bin/llvm-ar" \
-DRUN_HAVE_STD_REGEX=0 \
-DCMAKE_RANLIB="/usr/local/bin/llvm-ranlib" \
-DUSE_INTERNAL_TIFLASH_PROXY=FALSE \
-DPREBUILT_LIBS_ROOT="${SRCPATH}/contrib/tiflash-proxy" \
-GNinja

ninja tiflash
Expand All @@ -159,10 +164,13 @@ source ${SCRIPTPATH}/utils/vendor_dependency.sh

# Reduce binary size by compressing.
llvm-objcopy --compress-debug-sections=zlib-gnu "${BUILD_DIR}/dbms/src/Server/tiflash" "${INSTALL_DIR}/tiflash"
cp -f "${SRCPATH}/libs/libtiflash-proxy/libtiflash_proxy.so" "${INSTALL_DIR}/libtiflash_proxy.so"

vendor_dependency "${INSTALL_DIR}/tiflash" libc++.so "${INSTALL_DIR}/"
vendor_dependency "${INSTALL_DIR}/tiflash" libc++abi.so "${INSTALL_DIR}/"

cp -f "${SRCPATH}/contrib/tiflash-proxy/target/release/libtiflash_proxy.so" "${INSTALL_DIR}/libtiflash_proxy.so"

# unset LD_LIBRARY_PATH before test
unset LD_LIBRARY_PATH
readelf -d "${INSTALL_DIR}/tiflash"
ldd "${INSTALL_DIR}/tiflash"
Expand Down
Loading

0 comments on commit e7612d9

Please sign in to comment.