[lld] [lld][ELF] Support LLVM repository and LLVM revision information (PR #97323)
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 11:01:15 PDT 2024
petrhosek wrote:
I think this change should instead be made to https://github.com/llvm/llvm-project/blob/f9efc295089217425d8220af892dcc5ede9eb9f7/lld/Common/Version.cpp so it applies to all LLD drivers uniformly.
Specifically, the comment above `getLLDVersion` says:
https://github.com/llvm/llvm-project/blob/f9efc295089217425d8220af892dcc5ede9eb9f7/lld/Common/Version.cpp#L17-L19
That's not the case though since the string doesn't include the repository or the revision information, so I'd change the implementation to match the comment.
I'd also consider removing the parenthesis around the `compatible with GNU linkers` part in the ELF driver so we end up with:
```
LLD 19.0.0 (https://github.com/yugier/llvm-project.git 4134b33c6a362cb462b335177d6d9e8235f04309) compatible with GNU linkers
```
I think this is a bit cleaner than:
```
LLD 19.0.0 (https://github.com/yugier/llvm-project.git 4134b33c6a362cb462b335177d6d9e8235f04309) (compatible with GNU linkers)
```
https://github.com/llvm/llvm-project/pull/97323
More information about the llvm-commits
mailing list