[llvm] [llvm] Include LLVM_REPOSITORY and LLVM_REVISION in tool version (PR #84990)

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 09:24:33 PDT 2024


JDevlieghere wrote:

Possibly, but I actually don't really care about the LLVM_REPOSITORY/LLVM_REVISION all that much. We just happen to abuse that downstream to pass the clang version and including the repo/hash in the version output seemed like a nice improvement upstream as well. The real problem I was trying to address is that `dwarfdump` and `dsymutil` currently print:

```
$ dwarfdump --version
Apple LLVM version 15.0.0
```

while previously they would print:

```
$ dwarfdump --version
Apple LLVM version 15.0.0 (clang-1500.3.9.4)
```

I traced the issue back to https://reviews.llvm.org/D126977 where @rnk removed `LLVM_VERSION_INFO` and actually predicted the mistake I made here of adding a dependency on `llvm_vcsrevision_h`. To solve my concrete problem, appending to `PACKAGE_VERSION` would be the right thing to do, but it's used in a bunch of places and I don't have the bandwidth to qualify that won't break anything. I ended up partially reverting Reid's patch internally so I can include the version number for just the tools.

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


More information about the llvm-commits mailing list