Skip to content

Commit

Permalink
Switch to monorepo style build.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed May 19, 2022
1 parent 3c92d06 commit 09f670b
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
set -e
set -x

curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz
curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang-$version.src.tar.xz
curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/llvm-project-$version.src.tar.xz
uname
if [[ $(uname) = MINGW* ]]; then
7z x -y llvm-$version.src.tar.xz
7z x -y llvm-$version.src.tar
7z x -y clang-$version.src.tar.xz
7z x -y clang-$version.src.tar
7z x -y llvm-project-$version.src.tar.xz
7z x -y llvm-project-$version.src.tar
else
tar xf llvm-$version.src.tar.xz
tar xf clang-$version.src.tar.xz
tar xf llvm-project-$version.src.tar.xz
fi
mv clang-$version.src llvm-$version.src/tools/clang

mkdir build install
cd build
Expand All @@ -24,14 +19,14 @@ if [[ $(uname) = MINGW* ]]; then
export CMAKE_GENERATOR_PLATFORM=x64
export CMAKE_GENERATOR_TOOLSET="host=x64"
fi
cmake ../llvm-$version.src -DCMAKE_INSTALL_PREFIX=$PWD/../install -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_ENABLE_LIBEDIT=OFF -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_ASSERTIONS=OFF
cmake ../llvm-project-$version.src/llvm -DCMAKE_INSTALL_PREFIX=$PWD/../install -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_ENABLE_LIBEDIT=OFF -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_ASSERTIONS=OFF
if [[ $(uname) = MINGW* ]]; then
cmake --build . --target INSTALL --config Release -j${threads:-4}
else
make install -j${threads:-4}
fi
cd ..
rm -rf build llvm-$version.src* clang-$version.src*
rm -rf build llvm-project-$version.src*

mv install clang+llvm-$version-$triple
if [[ $(uname) = MINGW* ]]; then
Expand Down

0 comments on commit 09f670b

Please sign in to comment.