2020-05-22 23:54:28 +02:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
# Pull all the submodules except llvm
|
|
|
|
# Note: Tried to use git submodule status, but it takes over 20 seconds
|
|
|
|
# shellcheck disable=SC2046
|
2020-07-13 01:20:09 +02:00
|
|
|
git submodule -q update --init --depth 1 $(awk '/path/ && !/llvm/ { print $3 }' .gitmodules)
|
2020-05-22 23:54:28 +02:00
|
|
|
|
2020-12-22 04:37:14 +01:00
|
|
|
# Prefer newer Clang than in base system (see also .ci/install-freebsd.sh)
|
|
|
|
# libc++ isn't in llvm* packages, so download manually
|
2022-12-08 13:31:58 +01:00
|
|
|
fetch https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/llvm-project-15.0.6.src.tar.xz
|
|
|
|
tar xf llvm*.tar.xz
|
|
|
|
export CC=clang15 CXX=clang++15
|
2021-11-30 17:12:37 +01:00
|
|
|
cmake -B libcxx_build -G Ninja -S llvm*/libcxx \
|
|
|
|
-DLLVM_CCACHE_BUILD=ON \
|
2022-12-08 13:31:58 +01:00
|
|
|
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
|
2021-11-30 17:12:37 +01:00
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=libcxx_prefix
|
|
|
|
cmake --build libcxx_build
|
|
|
|
cmake --install libcxx_build
|
|
|
|
export CXXFLAGS="$CXXFLAGS -nostdinc++ -isystem$PWD/libcxx_prefix/include/c++/v1"
|
|
|
|
export LDFLAGS="$LDFLAGS -nostdlib++ -L$PWD/libcxx_prefix/lib -l:libc++.a -lcxxrt"
|
2020-12-22 04:37:14 +01:00
|
|
|
|
2020-05-22 23:54:28 +02:00
|
|
|
CONFIGURE_ARGS="
|
|
|
|
-DWITH_LLVM=OFF
|
2022-10-15 21:01:38 +02:00
|
|
|
-DUSE_SDL=OFF
|
2020-05-22 23:54:28 +02:00
|
|
|
-DUSE_PRECOMPILED_HEADERS=OFF
|
|
|
|
-DUSE_NATIVE_INSTRUCTIONS=OFF
|
|
|
|
-DUSE_SYSTEM_FFMPEG=ON
|
|
|
|
-DUSE_SYSTEM_CURL=ON
|
|
|
|
-DUSE_SYSTEM_LIBPNG=ON
|
|
|
|
"
|
|
|
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
cmake -B build -G Ninja $CONFIGURE_ARGS
|
|
|
|
cmake --build build
|
|
|
|
|
2020-07-13 01:15:32 +02:00
|
|
|
ccache --show-stats
|
|
|
|
ccache --zero-stats
|