63 lines
1.5 KiB
Docker
63 lines
1.5 KiB
Docker
FROM alpine:latest
|
|
|
|
RUN apk add --no-cache \
|
|
bash \
|
|
clang \
|
|
llvm \
|
|
cmake \
|
|
git \
|
|
make \
|
|
g++ \
|
|
python3 \
|
|
py3-pip \
|
|
mesa-dev \
|
|
mesa-gl \
|
|
pkgconf \
|
|
mold \
|
|
ninja \
|
|
libc-dev \
|
|
zlib-dev \
|
|
libunwind-dev
|
|
|
|
RUN pip install --no-cache-dir --break-system-packages conan gitpython \
|
|
&& conan profile detect
|
|
|
|
RUN clang --version \
|
|
&& conan --version \
|
|
&& pip --version \
|
|
&& cmake --version \
|
|
&& g++ --version \
|
|
&& clang --version \
|
|
&& ninja --version \
|
|
&& mold --version
|
|
|
|
RUN git clone --depth=1 https://github.com/llvm/llvm-project.git -b llvmorg-20.1.8
|
|
RUN cd llvm-project/ \
|
|
&& rm -rf build/ \
|
|
&& mkdir build/ \
|
|
&& cd build/ \
|
|
&& cmake \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_LINKER_TYPE="MOLD" \
|
|
-DCMAKE_INSTALL_PREFIX=/libcxx_lsan \
|
|
-DCMAKE_C_COMPILER=clang \
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
|
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
|
|
-DLLVM_ENABLE_PIC=ON \
|
|
-DLIBCXX_INSTALL_MODULES=ON \
|
|
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
|
|
-DLLVM_USE_SANITIZER=Leaks \
|
|
../runtimes &&\
|
|
ninja cxx cxxabi && \
|
|
cd ../\
|
|
&& DESTDIR="/libcxx_lsan" ninja -C build install-cxx install-cxxabi\
|
|
&& rm -rf /usr/src/llvm-project/
|
|
|
|
# RUN git clone 'https://git.light7734.com/light7734/light.git' --recursive \
|
|
# && cd light \
|
|
# && conan install . \
|
|
# -s build_type=Release \
|
|
# -c tools.system.package_manager:mode=install \
|
|
# -c tools.cmake.cmaketoolchain:generator=Ninja \
|
|
# --build=missing
|