ソースを参照

Introduce switch-to-latest-clang script

master
rayburgemeestre 3年前
コミット
aeb86dbcc2
14個のファイルの変更26行の追加62行の削除
  1. +4
    -0
      Dockerfile-ubuntu2004
  2. +1
    -5
      allegro5/Makefile
  3. +1
    -5
      benchmarklib/Makefile
  4. +1
    -5
      boost/Makefile
  5. +1
    -5
      caf/Makefile
  6. +2
    -6
      crtmpserver/Makefile
  7. +1
    -5
      fastpfor/Makefile
  8. +1
    -5
      fmt/Makefile
  9. +1
    -5
      imagemagick/Makefile
  10. +1
    -5
      openexr/Makefile
  11. +1
    -5
      seasocks/Makefile
  12. +1
    -6
      sfml/Makefile
  13. +9
    -0
      switch-to-latest-clang
  14. +1
    -5
      v8pp/Makefile

+ 4
- 0
Dockerfile-ubuntu2004 ファイルの表示

# 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-12/lib/libc++abi.so.1.0 /usr/lib/llvm-12/lib/libc++abi.so RUN cp -prv /usr/lib/llvm-12/lib/libc++abi.so.1.0 /usr/lib/llvm-12/lib/libc++abi.so


COPY switch-to-latest-clang /usr/local/bin/switch-to-latest-clang

RUN chmod +x /usr/local/bin/switch-to-latest-clang

CMD "/bin/bash" CMD "/bin/bash"

+ 1
- 5
allegro5/Makefile ファイルの表示

libpng-dev libjpeg-dev libfreetype6-dev \ libpng-dev libjpeg-dev libfreetype6-dev \
libxrandr-dev libxinerama-dev libxi-dev \ libxrandr-dev libxinerama-dev libxi-dev \
libgtk2.0-dev libsdl2-dev libgtk2.0-dev libsdl2-dev
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang


impl: impl:
make prep make prep

+ 1
- 5
benchmarklib/Makefile ファイルの表示

make package make package


impl: impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
# TODO install boost from apt repo # TODO install boost from apt repo
# if [[ -f CMakeCache.txt ]]; then rm CMakeCache.txt; fi # if [[ -f CMakeCache.txt ]]; then rm CMakeCache.txt; fi
dpkg -i boost/pkg/*.deb dpkg -i boost/pkg/*.deb

+ 1
- 5
boost/Makefile ファイルの表示

bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R


impl: impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
pushd boost && \ pushd boost && \
mkdir -p target && \ mkdir -p target && \
CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \ CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \

+ 1
- 5
caf/Makefile ファイルの表示

make package make package


impl: impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
pushd actor-framework && \ pushd actor-framework && \
CXX="$(which c++)" ./configure --cxx-flags="-stdlib=libstdc++" --disable-shared-libs --prefix=$$PWD/caf_out && \ CXX="$(which c++)" ./configure --cxx-flags="-stdlib=libstdc++" --disable-shared-libs --prefix=$$PWD/caf_out && \
echo patch CMakeLists.txt ../caf-cmakefile.patch && \ echo patch CMakeLists.txt ../caf-cmakefile.patch && \

+ 2
- 6
crtmpserver/Makefile ファイルの表示

apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev
apt-get install -y libssl1.0-dev apt-get install -y libssl1.0-dev
# rm -rf crtmpserver/builders/cmake/CMakeCache.txt # rm -rf crtmpserver/builders/cmake/CMakeCache.txt
# switch to clang 7, crtmpserver build broken with g++
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
# switch to clang, crtmpserver build broken with g++
switch-to-latest-clang
pushd crtmpserver/builders/cmake && \ pushd crtmpserver/builders/cmake && \
make clean || true && \ make clean || true && \
rm -rf CMakeCache.txt && \ rm -rf CMakeCache.txt && \

+ 1
- 5
fastpfor/Makefile ファイルの表示



impl: impl:
patch FastPFor/CMakeLists.txt libcpp.patch patch FastPFor/CMakeLists.txt libcpp.patch
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
pushd FastPFor && \ pushd FastPFor && \
CXX=$$(which c++) cmake . && \ CXX=$$(which c++) cmake . && \
make -j $$(nproc) make -j $$(nproc)

+ 1
- 5
fmt/Makefile ファイルの表示

bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions


impl: impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
apt-get update && apt-get install libz-dev -y && \ apt-get update && apt-get install libz-dev -y && \
pushd fmt && \ pushd fmt && \
mkdir build && pushd build && \ mkdir build && pushd build && \

+ 1
- 5
imagemagick/Makefile ファイルの表示

bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions


impl: impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
apt-get update && apt-get install libz-dev autoconf -y && \ apt-get update && apt-get install libz-dev autoconf -y && \
apt-get install -y libpng-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libtiff-dev libtiff5-dev libtiffxx5 && \ apt-get install -y libpng-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libtiff-dev libtiff5-dev libtiffxx5 && \
dpkg -i openexr/pkg/*.deb && \ dpkg -i openexr/pkg/*.deb && \

+ 1
- 5
openexr/Makefile ファイルの表示

bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions


impl: impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
apt-get update && apt-get install libz-dev -y && \ apt-get update && apt-get install libz-dev -y && \
pushd openexr && \ pushd openexr && \
mkdir build && pushd build && \ mkdir build && pushd build && \

+ 1
- 5
seasocks/Makefile ファイルの表示

bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions


impl: impl:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
apt-get update && apt-get install libz-dev -y && \ apt-get update && apt-get install libz-dev -y && \
pushd seasocks && \ pushd seasocks && \
mkdir build && pushd build && \ mkdir build && pushd build && \

+ 1
- 6
sfml/Makefile ファイルの表示

libgtk2.0-dev libgtk2.0-dev
# extra needed # extra needed
apt-get install -y libudev-dev libopenal-dev libflac-dev libvorbis-dev apt-get install -y libudev-dev libopenal-dev libflac-dev libvorbis-dev

update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
# static build # static build
pushd SFML && \ pushd SFML && \
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/sfml_static -DBUILD_SHARED_LIBS=false . && \ cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/sfml_static -DBUILD_SHARED_LIBS=false . && \

+ 9
- 0
switch-to-latest-clang ファイルの表示

#!/bin/bash

set -ex

update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-12 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-12 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-12 40

+ 1
- 5
v8pp/Makefile ファイルの表示

bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions


build: build:
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
switch-to-latest-clang
apt-get update apt-get update
apt-get install pkg-config python2.7 -y apt-get install pkg-config python2.7 -y
cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts

読み込み中…
キャンセル
保存