[lld] [lld][ELF] Support LLVM repository and LLVM revision information (PR #97323)

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 10:57:45 PDT 2024


================
@@ -22,6 +22,10 @@ std::string lld::getLLDVersion() {
 #define LLD_VENDOR_DISPLAY LLD_VENDOR " "
 #else
 #define LLD_VENDOR_DISPLAY
+#endif
+#if defined(LLVM_REPOSITORY) || defined(LLVM_REVISION)
+  return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING " (" LLVM_REPOSITORY
+                            " " LLVM_REVISION ")";
 #endif
   return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING;
----------------
petrhosek wrote:

```suggestion
#if defined(LLVM_REPOSITORY) || defined(LLVM_REVISION)
  return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING " (" LLVM_REPOSITORY
                            " " LLVM_REVISION ")";
#else
  return LLD_VENDOR_DISPLAY "LLD " LLD_VERSION_STRING;
#endif
```

https://github.com/llvm/llvm-project/pull/97323


More information about the llvm-commits mailing list