diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h index 7d090ba682b..60ce0bdbfc3 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.h @@ -91,6 +91,10 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF { // Until dtrace (via CTF) and LLDB can deal with distributed debug info, // FreeBSD defaults to standalone/full debug info. bool GetDefaultStandaloneDebug() const override { return true; } + // On FreeBSD, `/usr/bin/ld` is `ld.lld`, but other things may be installed in + // the path named `ld` or `{triple}-ld`, which may be picked by preference if + // we default to `ld` here. + const char *getDefaultLinker() const override { return "ld.lld"; } protected: Tool *buildAssembler() const override;