瀏覽代碼

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 查看文件

apt-get -y install vim gdb strace patch && \ apt-get -y install vim gdb strace patch && \
\ \
apt update -y && \ 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/* rm -rf /var/lib/apt/lists/*


RUN /emsdk/upstream/emscripten/em++ -s WASM=1 -s USE_SDL=2 -s USE_SDL_TTF=2 -O3 /dev/null || true 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) # 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! # EDIT: no longer needed!
# RUN cp -prv /usr/lib/llvm-14/lib/libunwind.so.1.0 /usr/lib/llvm-14/lib/libunwind.so # 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 查看文件

set +e set +e
set -o pipefail 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++) echo compiler set to: $(readlink /etc/alternatives/c++)

Loading…
取消
儲存