From 01df180bfb82c7eafac4638ced249bee4409784b Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 23 Oct 2024 17:03:32 +0100 Subject: [PATCH] depends: add mold & ld.lld to gen_id We use `lld` when cross-compiling for macOS, and it's version should be tied to LLVM. However someone compiling with GCC and `-fuse-ld=lld` would not see a cache bust if the LLVM toolchain was updated. We don't use `mold` directly, but I'm aware of it's usage in infrastructure, along with depends, used to test the project. --- depends/gen_id | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/depends/gen_id b/depends/gen_id index d79c6da85a1..fe6d163547a 100755 --- a/depends/gen_id +++ b/depends/gen_id @@ -58,6 +58,17 @@ echo "CXX_STANDARD=${CXX_STANDARD}" echo "END CXX" + # We use lld when cross-compiling for macOS, and it's version should + # be tied to LLVM. However someone compiling with GCC and -fuse-ld=lld + # would not see a cache bust if the LLVM toolchain was updated. + echo "BEGIN lld" + bash -c "ld.lld --version" + echo "END lld" + + echo "BEGIN mold" + bash -c "mold --version" + echo "END mold" + echo "BEGIN AR" bash -c "${AR} --version" env | grep '^AR_'