diff --git a/lld/tools/lld/lld.cpp b/lld/tools/lld/lld.cpp --- a/lld/tools/lld/lld.cpp +++ b/lld/tools/lld/lld.cpp @@ -28,6 +28,7 @@ #include "lld/Common/Driver.h" #include "lld/Common/ErrorHandler.h" #include "lld/Common/Memory.h" +#include "lld/Common/Version.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSwitch.h" @@ -156,9 +157,9 @@ else if (f == Wasm) return lld::wasm::link; else - die("lld is a generic driver.\n" - "Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld" - " (WebAssembly) instead"); + die("lld is a generic driver. (" + getLLDVersion() + + ")\nInvoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), " + "wasm-ld (WebAssembly) instead"); }(); // Run the driver. If an error occurs, false will be returned. bool r = link(args, stdoutOS, stderrOS, exitEarly, inTestOutputDisabled);