| ... | ... | @@ -18,12 +18,28 @@ sudo apt-get install -y libxml2-dev libclang-10-dev llvm-10 llvm-10-dev liblld-1 |
| 18 | 18 | # This will affect the cmake command below. |
| 19 | 19 | git config core.abbrev 9 |
| 20 | 20 | |
| 21 | # This patch is a workaround for |
| 22 | # https://bugs.llvm.org/show_bug.cgi?id=44870 / https://github.com/llvm/llvm-project/issues/191 |
| 23 | # It only applies to the apt.llvm.org packages. |
| 24 | patch <<'END_PATCH' |
| 25 | --- CMakeLists.txt |
| 26 | +++ CMakeLists.txt |
| 27 | @@ -369,6 +369,7 @@ target_link_libraries(zig_cpp LINK_PUBLIC |
| 28 | ${CLANG_LIBRARIES} |
| 29 | ${LLD_LIBRARIES} |
| 30 | ${LLVM_LIBRARIES} |
| 31 | + "-Wl,/usr/lib/llvm-10/lib/LLVMPolly.so" |
| 32 | ) |
| 33 | |
| 34 | add_library(opt_c_util STATIC ${OPTIMIZED_C_SOURCES}) |
| 35 | END_PATCH |
| 36 | |
| 21 | 37 | export CC=gcc-7 |
| 22 | 38 | export CXX=g++-7 |
| 23 | 39 | mkdir build |
| 24 | 40 | cd build |
| 25 | 41 | cmake .. -DCMAKE_BUILD_TYPE=Release |
| 26 | | make -j2 install |
| 42 | make -j$(nproc) install |
| 27 | 43 | ./zig build test -Denable-qemu |
| 28 | 44 | VERSION="$(./zig version)" |
| 29 | 45 | |