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
|
2021-04-13 15:02:18 +02:00
|
|
|
fetch https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/libcxx-12.0.0.src.tar.xz
|
|
|
|
tar xf libcxx-12.0.0.src.tar.xz
|
|
|
|
export CC=clang12 CXX=clang++12
|
|
|
|
export CXXFLAGS="$CXXFLAGS -nostdinc++ -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -isystem $PWD/libcxx-12.0.0.src/include"
|
2020-12-22 04:37:14 +01:00
|
|
|
|
2020-05-22 23:54:28 +02:00
|
|
|
CONFIGURE_ARGS="
|
|
|
|
-DWITH_LLVM=OFF
|
|
|
|
-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
|