Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace complexity with simplicity for faster libc++ setup #1539

Merged
merged 5 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/.libcxx-setup.sh

This file was deleted.

27 changes: 27 additions & 0 deletions .github/libcxx-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

# Checkout LLVM sources
#git clone --depth=1 https://github.com/llvm/llvm-project.git llvm-project
#
## 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)
#cd ./llvm-project
#cmake -DCMAKE_C_COMPILER=${CC} \
# -DCMAKE_CXX_COMPILER=${CXX} \
# -DCMAKE_BUILD_TYPE=RelWithDebInfo \
# -DCMAKE_INSTALL_PREFIX=/usr \
# -DLIBCXX_ABI_UNSTABLE=OFF \
# -DLLVM_USE_SANITIZER=${LIBCXX_SANITIZER} \
# -DLLVM_BUILD_32_BITS=${BUILD_32_BITS} \
# -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' \
# -S llvm -B llvm-build -G "Unix Makefiles"
#make -C llvm-build -j3 cxx cxxabi
#sudo make -C llvm-build install-cxx install-cxxabi
#cd ..

sudo apt update
sudo apt -y install libc++-dev libc++abi-dev
8 changes: 7 additions & 1 deletion .github/workflows/sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
echo "EXTRA_FLAGS=-g -O2 -fno-omit-frame-pointer -fsanitize=thread -fno-sanitize-recover=all" >> $GITHUB_ENV
echo "LIBCXX_SANITIZER=Thread" >> $GITHUB_ENV

- name: fine-tune asan options
# in clang+asan we get an error from std::regex. ignore it.
if: matrix.sanitizer == 'asan' && matrix.compiler == 'clang'
run: |
echo "ASAN_OPTIONS=alloc_dealloc_mismatch=0" >> $GITHUB_ENV

- name: setup clang
if: matrix.compiler == 'clang'
uses: egor-tensin/setup-clang@v1
Expand All @@ -68,7 +74,7 @@ jobs:
- name: install llvm stuff
if: matrix.compiler == 'clang'
run: |
"${GITHUB_WORKSPACE}/.github/.libcxx-setup.sh"
"${GITHUB_WORKSPACE}/.github/libcxx-setup.sh"
echo "EXTRA_CXX_FLAGS=\"-stdlib=libc++\"" >> $GITHUB_ENV

- name: create build environment
Expand Down