build: FreeBSD building needs the llvm linker

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
Willem Jan Withagen 2018-11-25 15:38:54 +01:00
parent f89c75f184
commit 6ef950e868
1 changed files with 10 additions and 2 deletions

View File

@ -14,6 +14,14 @@ fi
# To test with a new release Clang, use with cmake:
# -D CMAKE_CXX_COMPILER="/usr/local/bin/clang++-devel" \
# -D CMAKE_C_COMPILER="/usr/local/bin/clang-devel" \
COMPILE_FLAGS="-O0 -g"
if [ `sysctl -n kern.osreldate` -le 1102000 ]; then
# We need to use the llvm linker for linking ceph-dencoder
COMPILE_FLAGS="$COMPILE_FLAGS -fuse-ld=/usr/bin/ld.lld"
fi
CMAKE_CXX_FLAGS_DEBUG="$CXX_FLAGS_DEBUG $COMPILE_FLAGS"
CMAKE_C_FLAGS_DEBUG="$C_FLAGS_DEBUG $COMPILE_FLAGS"
#
# On FreeBSD we need to preinstall all the tools that are required for building
# dashboard, because versions fetched are not working on FreeBSD.
@ -27,8 +35,8 @@ fi
./do_cmake.sh "$*" \
-D WITH_CCACHE=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_CXX_FLAGS_DEBUG="$CXX_FLAGS_DEBUG -O0 -g" \
-D CMAKE_C_FLAGS_DEBUG="$C_FLAGS_DEBUG -O0 -g" \
-D CMAKE_CXX_FLAGS_DEBUG="$CXX_FLAGS_DEBUG" \
-D CMAKE_C_FLAGS_DEBUG="$C_FLAGS_DEBUG" \
-D ENABLE_GIT_VERSION=OFF \
-D WITH_SYSTEM_BOOST=ON \
-D WITH_SYSTEM_NPM=ON \