[llvm-dev] Compiler used to build LLVM
Davide Italiano via llvm-dev
llvm-dev at lists.llvm.org
Thu Oct 27 18:38:45 PDT 2016
On Thu, Oct 27, 2016 at 5:39 PM, Maxime Chevalier-Boisvert via
llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hello,
>
> We’d like to keep track of which clang version was used to build our LLVM binaries. We use cmake and ninja with clang to build. What do you people think would be the cleanest way to know which version of clang is used, on a user’s machine, to build those binaries. I’m hoping to script this. I was thinking that getting cmake/ninja to spit out this information, if possible, would probably be best.
>
This is working already:
$ objdump -x -s -j .comment ./opt
Contents of section .comment:
0000 4743433a 2028474e 55292036 2e312e31 GCC: (GNU) 6.1.1
0010 20323031 36303632 31202852 65642048 20160621 (Red H
0020 61742036 2e312e31 2d332900 636c616e at 6.1.1-3).clan
0030 67207665 7273696f 6e20342e 302e3020 g version 4.0.0
0040 28747275 6e6b2032 38353332 36292028 (trunk 285326) (
0050 6c6c766d 2f747275 6e6b2032 38353331 llvm/trunk 28531
0060 38290063 6c616e67 20766572 73696f6e 8).clang version
0070 20342e30 2e302028 7472756e 6b203238 4.0.0 (trunk 28
0080 34323239 2920286c 6c766d2f 7472756e 4229) (llvm/trun
0090 6b203238 34323438 2900636c 616e6720 k 284248).clang
00a0 76657273 696f6e20 342e302e 30202874 version 4.0.0 (t
00b0 72756e6b 20323832 30383929 20286c6c runk 282089) (ll
00c0 766d2f74 72756e6b 20323832 30393829 vm/trunk 282098)
00d0 00636c61 6e672076 65727369 6f6e2034 .clang version 4
00e0 2e302e30 20287472 756e6b20 32383335 .0.0 (trunk 2835
00f0 37342920 286c6c76 6d2f7472 756e6b20 74) (llvm/trunk
0100 32383335 39392900 283599).
It should be easy to enable for your platform if it's disabled/not there.
--
Davide
"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
More information about the llvm-dev
mailing list