1
0
mirror of https://github.com/exaloop/codon.git synced 2025-06-03 15:03:52 +08:00
codon/scripts/deps.sh
A. R. Shajii e1016f9e9a
Upgrade to LLVM 15 (#56)
* Upgrade to LLVM 15 (WIP)

* Call `setPresplitCoroutine()` on coro LLVM funcs

* Use new pass manager

* Update deps

* Update docs

* Fix exceptions on M1

* Add libunwind

* Use Orc and JITLink for "codon run"

* JITLink integration

* Fix callback

* Fix strbuf, fix GC root registration

* Fix test init

* Fix llvm function

* Fix pickle, float atomics

* Add TargetLibraryAnalysis

* Use new LLVM pass manager in GPU codegen

* Fix libunwind linking

* Fix libunwind

* Fix GPU passes

* Don't link libunwind explicitly

* Bump version

* Update plugins for new pass manager

* Fix bash error

* Fix GPU GV extraction

* Move simd module to experimental folder

* Update file read

* Add benchmark programs

* Add dynamic tuple

* Fix parser tuple slicing bug

* Make DynamicTuple interoperable with Tuple

* Fix DynamicTuple GPU interop

* Dockerize builds

* Simplify CMake

* Revert "Simplify CMake"

This reverts commit 08d2920349b5033750b54b4fb7aaa9bac264b750.

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2022-10-14 09:31:10 -04:00

43 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
export INSTALLDIR="${PWD}/llvm"
export SRCDIR="${PWD}/llvm-project"
mkdir -p "${INSTALLDIR}" "${SRCDIR}"
export JOBS=1
if [ -n "${1}" ]; then export JOBS="${1}"; fi
echo "Using ${JOBS} cores..."
LLVM_BRANCH="codon"
if [ ! -f "${INSTALLDIR}/bin/llvm-config" ]; then
git clone --depth 1 -b "${LLVM_BRANCH}" https://github.com/exaloop/llvm-project "${SRCDIR}"
# llvm
mkdir -p "${SRCDIR}/llvm/build"
cd "${SRCDIR}/llvm/build"
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_ZLIB=OFF \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_TARGETS_TO_BUILD=all \
-DCMAKE_INSTALL_PREFIX="${INSTALLDIR}"
make -j "${JOBS}"
make install
# clang
if ! command -v clang &> /dev/null; then
mkdir -p "${SRCDIR}/clang/build"
cd "${SRCDIR}/clang/build"
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALLDIR}"
make -j "${JOBS}"
make install
fi
"${INSTALLDIR}/bin/llvm-config" --cmakedir
fi