From f910a152f1f1e228ffacc154b268ccf74db16dae Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 30 Nov 2021 16:12:37 +0000 Subject: [PATCH] CI: switch FreeBSD to Clang/libc++ 13 (#11214) --- .ci/build-freebsd.sh | 14 ++++++++++---- .ci/install-freebsd.sh | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.ci/build-freebsd.sh b/.ci/build-freebsd.sh index 66a7319380..df1b322c0d 100755 --- a/.ci/build-freebsd.sh +++ b/.ci/build-freebsd.sh @@ -7,10 +7,16 @@ git submodule -q update --init --depth 1 $(awk '/path/ && !/llvm/ { print $3 }' # Prefer newer Clang than in base system (see also .ci/install-freebsd.sh) # libc++ isn't in llvm* packages, so download manually -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" +fetch https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-13.0.1-rc1.tar.gz +tar xf llvm*.tar.gz +export CC=clang13 CXX=clang++13 +cmake -B libcxx_build -G Ninja -S llvm*/libcxx \ + -DLLVM_CCACHE_BUILD=ON \ + -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" CONFIGURE_ARGS=" -DWITH_LLVM=OFF diff --git a/.ci/install-freebsd.sh b/.ci/install-freebsd.sh index 40da1f39df..30b067473a 100755 --- a/.ci/install-freebsd.sh +++ b/.ci/install-freebsd.sh @@ -9,7 +9,7 @@ export ASSUME_ALWAYS_YES=true pkg info # debug # Prefer newer Clang than in base system (see also .ci/build-freebsd.sh) -pkg install llvm12 +pkg install llvm13 # Mandatory dependencies (qt5-dbus and qt5-gui are pulled via qt5-widgets) pkg install git ccache cmake ninja qt5-qmake qt5-buildtools qt5-widgets qt5-concurrent qt5-multimedia qt5-svg glew openal-soft ffmpeg