Skip to content

Commit

Permalink
fix(cmake): make sure libc++ is utilized by tiflash-proxy (pingcap#5281)
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingerZhu authored and Lloyd-Pottiger committed Jul 19, 2022
1 parent 3f3cfb5 commit 5f1d278
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrib/tiflash-proxy-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ file(GLOB_RECURSE _TIFLASH_PROXY_SRCS "${_TIFLASH_PROXY_SOURCE_DIR}/*.rs")
list(FILTER _TIFLASH_PROXY_SRCS EXCLUDE REGEX ${_TIFLASH_PROXY_SOURCE_DIR}/target/.*)

# use `CFLAGS=-w CXXFLAGS=-w` to inhibit warning messages.
set(TIFLASH_RUST_ENV CMAKE=${CMAKE_COMMAND} CFLAGS=-w CXXFLAGS=-w)
if (TIFLASH_LLVM_TOOLCHAIN)
set(TIFLASH_RUST_ENV CMAKE=${CMAKE_COMMAND} "CFLAGS=-w -fuse-ld=lld" "CXXFLAGS=-w -fuse-ld=lld -stdlib=libc++")
else()
set(TIFLASH_RUST_ENV CMAKE=${CMAKE_COMMAND} CFLAGS=-w CXXFLAGS=-w)
endif()

if(TIFLASH_LLVM_TOOLCHAIN AND USE_LIBCXX)
set(TIFLASH_RUST_LINKER ${CMAKE_CURRENT_BINARY_DIR}/tiflash-linker)
Expand Down

0 comments on commit 5f1d278

Please sign in to comment.