Skip to content

Commit

Permalink
enable llvm component and remove obsolete workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Sep 26, 2022
1 parent 31fff4c commit 07f9d65
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,16 @@ jobs:
run: |
git clone -q --depth 1 -b llvmorg-15.0.1 --recursive https://github.com/llvm/llvm-project
pushd llvm-project
if [[ '${{ matrix.os }}' == ubuntu-* ]]; then
# shrug
sed -i 's/if (LIBCXX_HAS_ATOMIC_LIB)/if (NO)/' libcxx/CMakeLists.txt
fi
mkdir build
cd build
cmake -G Ninja ../llvm -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../../lean-llvm -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_USE_LINKER=lld\
-DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_CCACHE_BUILD=ON\
-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_ENABLE_LIBCXX=ON\
-DLLVM_ENABLE_PROJECTS="llvm;clang;lld;compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_CCACHE_BUILD=ON\
-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_ENABLE_LIBCXX=ON -DLLVM_ENABLE_FFI=OFF\
`# https://boxbase.org/entries/2018/jun/11/minimal-llvm-build/`\
-DLLVM_TARGETS_TO_BUILD='AArch64;WebAssembly;X86'\
`# https://libcxx.llvm.org/BuildingLibcxx.html`\
-DCLANG_DEFAULT_CXX_STDLIB=libc++ -DCLANG_DEFAULT_LINKER=lld -DCLANG_DEFAULT_RTLIB=compiler-rt -DLIBCXX_USE_COMPILER_RT=ON -DLIBCXXABI_USE_COMPILER_RT=ON -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBUNWIND_USE_COMPILER_RT=ON -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON\
-DCOMPILER_RT_BUILD_SANITIZERS=OFF\
`# https://llvm.org/docs/BuildingADistribution.html`\
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON\
`# hide libc++ symbols in libleanshared`\
-DLIBCXX_HERMETIC_STATIC_LIBRARY=ON -DLIBCXXABI_HERMETIC_STATIC_LIBRARY=ON\
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON\
Expand Down

0 comments on commit 07f9d65

Please sign in to comment.