diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:35 +0000 |
commit | 6012fe9abb1f01b1b5b4ca908464804c21ff8602 (patch) | |
tree | a5232179237d9aaa3a03f9c783974fc5f09716c6 /utils/google-benchmark/.travis-libcxx-setup.sh | |
parent | 315d10f09ee888005b1da55e7bbb57d8a79b8447 (diff) |
Notes
Diffstat (limited to 'utils/google-benchmark/.travis-libcxx-setup.sh')
-rw-r--r-- | utils/google-benchmark/.travis-libcxx-setup.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/utils/google-benchmark/.travis-libcxx-setup.sh b/utils/google-benchmark/.travis-libcxx-setup.sh new file mode 100644 index 000000000000..a591743c6a6b --- /dev/null +++ b/utils/google-benchmark/.travis-libcxx-setup.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Install a newer CMake version +curl -sSL https://cmake.org/files/v3.6/cmake-3.6.1-Linux-x86_64.sh -o install-cmake.sh +chmod +x install-cmake.sh +sudo ./install-cmake.sh --prefix=/usr/local --skip-license + +# Checkout LLVM sources +git clone --depth=1 https://github.com/llvm-mirror/llvm.git llvm-source +git clone --depth=1 https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx +git clone --depth=1 https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi + +# Setup libc++ options +if [ -z "$BUILD_32_BITS" ]; then + export BUILD_32_BITS=OFF && echo disabling 32 bit build +fi + +# Build and install libc++ (Use unstable ABI for better sanitizer coverage) +mkdir llvm-build && cd llvm-build +cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIBCXX_ABI_UNSTABLE=ON \ + -DLLVM_USE_SANITIZER=${LIBCXX_SANITIZER} \ + -DLLVM_BUILD_32_BITS=${BUILD_32_BITS} \ + ../llvm-source +make cxx -j2 +sudo make install-cxxabi install-cxx +cd ../ |