mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 02:06:22 -04:00
build: manually install mold on alpine, as packaged version is broken
This commit is contained in:
parent
91c810cee9
commit
03b9f928fc
@ -81,6 +81,8 @@ RUN pip3 install --break-system-packages --root-user-action ignore mistletoe
|
|||||||
RUN git config --global --add safe.directory /workspace
|
RUN git config --global --add safe.directory /workspace
|
||||||
COPY install-static-libs.sh /usr/local/bin/install-static-libs.sh
|
COPY install-static-libs.sh /usr/local/bin/install-static-libs.sh
|
||||||
RUN bash /usr/local/bin/install-static-libs.sh gcc clang-19 :alpine
|
RUN bash /usr/local/bin/install-static-libs.sh gcc clang-19 :alpine
|
||||||
|
COPY install-mold.sh /usr/local/bin/install-mold.sh
|
||||||
|
RUN bash /usr/local/bin/install-mold.sh
|
||||||
RUN adduser -G users -s bash -u 1000 -D mhx
|
RUN adduser -G users -s bash -u 1000 -D mhx
|
||||||
RUN apk add --no-cache xxhash-dev
|
RUN apk add --no-cache xxhash-dev
|
||||||
USER mhx
|
USER mhx
|
||||||
|
22
.docker/install-mold.sh
Normal file
22
.docker/install-mold.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cd "$HOME"
|
||||||
|
mkdir pkgs
|
||||||
|
cd pkgs
|
||||||
|
|
||||||
|
MOLD_VERSION=2.37.1
|
||||||
|
|
||||||
|
wget -O mold-${MOLD_VERSION}.tar.gz https://github.com/rui314/mold/archive/refs/tags/v${MOLD_VERSION}.tar.gz
|
||||||
|
tar xf mold-${MOLD_VERSION}.tar.gz
|
||||||
|
cd mold-${MOLD_VERSION}
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
|
||||||
|
ninja
|
||||||
|
ninja install
|
||||||
|
|
||||||
|
cd "$HOME"
|
||||||
|
rm -rf pkgs
|
Loading…
x
Reference in New Issue
Block a user