From 10223eaea09edc3cf2fcfde2d7987cd4dd253e49 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 22 Mar 2020 17:03:53 -0400 Subject: [PATCH] ci: workaround for apt.llvm.org packaging bug --- ci/azure/linux_script | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ci/azure/linux_script b/ci/azure/linux_script index fe0309969..c34d8d324 100755 --- a/ci/azure/linux_script +++ b/ci/azure/linux_script @@ -18,12 +18,28 @@ sudo apt-get install -y libxml2-dev libclang-10-dev llvm-10 llvm-10-dev liblld-1 # This will affect the cmake command below. git config core.abbrev 9 +# This patch is a workaround for +# https://bugs.llvm.org/show_bug.cgi?id=44870 / https://github.com/llvm/llvm-project/issues/191 +# It only applies to the apt.llvm.org packages. +patch <<'END_PATCH' +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -369,6 +369,7 @@ target_link_libraries(zig_cpp LINK_PUBLIC + ${CLANG_LIBRARIES} + ${LLD_LIBRARIES} + ${LLVM_LIBRARIES} ++ "-Wl,/usr/lib/llvm-10/lib/LLVMPolly.so" + ) + + add_library(opt_c_util STATIC ${OPTIMIZED_C_SOURCES}) +END_PATCH + export CC=gcc-7 export CXX=g++-7 mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -make -j2 install +make -j$(nproc) install ./zig build test -Denable-qemu VERSION="$(./zig version)"