File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,7 @@ RUN echo "LLVM udate-alternatives" && \
376376# We are using Clang++ for compilation, so this download + compile step must happen after installing LLVM+Clang.
377377# We don't need to call mold's ./install-build-deps.sh, because all build dependencies are present.
378378# Note to overwrite ld: sudo ln -sf /opt/mold/bin/mold $(realpath /usr/bin/ld)
379+ # Note: mold is also added as "ld.mold". why is "-fuse-ld=ld.mold" and not "-fuse-ld=mold" used in CMake?
379380
380381SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
381382RUN echo "MOLD" && \
@@ -385,6 +386,7 @@ RUN echo "MOLD" && \
385386 cmake --build /tmp/mold/build -j "$(nproc)" && \
386387 cmake --install /tmp/mold/build --prefix=/opt/mold && \
387388 ln -s /opt/mold/bin/mold /usr/bin && \
389+ ln -sf /usr/bin/mold /usr/bin/ld.mold && \
388390 rm -rf /tmp/mold
389391
390392#
Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 && \
400400# We are using Clang++ for compilation, so this download + compile step must happen after installing LLVM+Clang.
401401# We don't need to call mold's ./install-build-deps.sh, because all build dependencies are present.
402402# Note to overwrite ld: sudo ln -sf /opt/mold/bin/mold $(realpath /usr/bin/ld)
403+ # Note: mold is also added as "ld.mold". why is "-fuse-ld=ld.mold" and not "-fuse-ld=mold" used in CMake?
403404
404405SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
405406RUN echo "MOLD" && \
@@ -409,6 +410,7 @@ RUN echo "MOLD" && \
409410 cmake --build /tmp/mold/build -j "$(nproc)" && \
410411 cmake --install /tmp/mold/build --prefix=/opt/mold && \
411412 ln -s /opt/mold/bin/mold /usr/bin && \
413+ ln -sf /usr/bin/mold /usr/bin/ld.mold && \
412414 rm -rf /tmp/mold
413415
414416#
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212- "It was a bright day in April, and the clocks were striking thirteen." - 1984
1313
14+ - added symlink for /usr/bin/mold -> /usr/bin/ld.mold (for -fuse-ld)
15+
1416## [ 1.0.12] - 2025-07-30
1517
1618** Changed**
You can’t perform that action at this time.
0 commit comments