浏览代码

Revert "Revert clang update, got too many weird issues."

This reverts commit f37c5aa5b8.

We now know that it was not the clang version that was the problem, it
was the linker (mold)
master
Ray Burgemeestre 1年前
父节点
当前提交
5abfe8996a
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. +3
    -3
      Dockerfile-ubuntu2204
  2. +5
    -5
      switch-to-latest-clang

+ 3
- 3
Dockerfile-ubuntu2204 查看文件

@@ -14,8 +14,8 @@ RUN apt-get update && \
apt-get -y install vim gdb strace patch && \
\
apt update -y && \
apt-get install -y clang-14 clang-tidy-14 libclang-14-dev clangd-14 lldb-14 lld-14 clangd-14 && \
apt-get install -y libc++-14-dev libc++-14-dev clang-format-14 && \
apt-get install -y clang-15 clang-tidy-15 libclang-15-dev clangd-15 lldb-15 lld-15 clangd-15 && \
apt-get install -y libc++-15-dev libc++-15-dev clang-format-15 clang-tidy-15 && \
\
rm -rf /var/lib/apt/lists/*

@@ -46,7 +46,7 @@ RUN sudo apt-get update && \
RUN /emsdk/upstream/emscripten/em++ -s WASM=1 -s USE_SDL=2 -s USE_SDL_TTF=2 -O3 /dev/null || true

# Fix some weird linker issue CAF build runs into. (fails to link -lc++abi)
RUN cp -prv /usr/lib/llvm-14/lib/libc++abi.so.1.0 /usr/lib/llvm-14/lib/libc++abi.so
RUN cp -prv /usr/lib/llvm-15/lib/libc++abi.so.1.0 /usr/lib/llvm-15/lib/libc++abi.so

# EDIT: no longer needed!
# RUN cp -prv /usr/lib/llvm-14/lib/libunwind.so.1.0 /usr/lib/llvm-14/lib/libunwind.so

+ 5
- 5
switch-to-latest-clang 查看文件

@@ -3,10 +3,10 @@
set +e
set -o pipefail

update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-14 40 > /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-14 40 >> /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 40 >> /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 40 >> /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-14 40 >> /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-15 40 > /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-15 40 >> /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 40 >> /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 40 >> /tmp/.switch-to-clang.stdout
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-15 40 >> /tmp/.switch-to-clang.stdout

echo compiler set to: $(readlink /etc/alternatives/c++)

正在加载...
取消
保存