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.
The depends cache should be busted when flags change, the same as any
other tooling change. Id also like to start passing *FLAGS into depends
inside the Guix env, which, without this change, doesn't bust the cache.
Add an option that when passed, will disable hardening options, and
pass `--disable-hardening` through to configure. Due to the way
we link libssp for Windows builds, they now fail (after #27118),
if building with depends, and configuring with --disable-hardening.
See:
https://github.com/bitcoin/bitcoin/pull/27118#issuecomment-1492606272.
This change would add a depends opiton such that, if someone wants to
build with, for windows, without hardening, they can do so. This may
also be useful when building for debugging.
We now use a script named gen_id to generate the base build_id/host_id.
This solves 2 problems:
1. GNU Make special-casing exit code 127 (command not found) meant that
warnings about missing tools would propagate to the user's terminal
and broke our opportunistic build_id construction.
2. This change ensures that we don't have arbitrary characters in our
make variables that would be misinterpreted by Make.
See comments in depends/Makefile and depends/gen_id for more
information.