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.
I’d like to make LLD embed version information so that we can determine if an executable was created by LLD and if that’s the case which version of LLD.
ld.bfd doesn’t seem to embed any information, so we cannot tell whether an executable was linked by ld.bfd or not easily.
ld.gold embeds a string “GNU gold ” as “.note.gnu.gold-version” section contents.
Echoing another thread, there seems to be a way to embed host compiler toolchain info in the assembly.-Kevin
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.