I’m trying to write some scripts that will download release artifacts for clang+llvm toolchains but the names of all the artifacts feel quite different and it’s hard to come up with a pattern that will grab the right available release artifact from a given release on Releases · llvm/llvm-project · GitHub . Can someone explain the conventions? It feels like it’d be ideal if they could just be platform triples.
Eh, they are platform triples? E.g. clang+llvm-$VERSION-$TRIPLE.tar.xz
:
- clang+llvm-14.0.6-aarch64-linux-gnu.tar.xz
- clang+llvm-14.0.6-amd64-unknown-freebsd12.tar.xz
- clang+llvm-14.0.6-amd64-unknown-freebsd13.tar.xz
- clang+llvm-14.0.6-armv7a-linux-gnueabihf.tar.xz
- clang+llvm-14.0.6-powerpc64-ibm-aix-7.2.tar.xz
- clang+llvm-14.0.6-powerpc64le-linux-rhel-8.4.tar.xz
- clang+llvm-14.0.6-powerpc64le-linux-ubuntu-18.04.5.tar.xz
- clang+llvm-14.0.6-x86_64-apple-darwin.tar.xz
The only odd one out is, as usual, Windows. Which uses LLVM-$VERSION-$WINXX
, e.g.:
- LLVM-14.0.6-win32.exe
- LLVM-14.0.6-win64.exe
- LLVM-14.0.6-woa64.zip
Shouldn’t this be clang+llvm-14.0.6-aarch64-unknown-linux-gnu.tar.xz?
Target triplets aren’t that strict, and ‘unknown’ (for the vendor field) is often, but not always, left out. There are other slight inconsistencies.
According to Specifying Target Triplets (Autoconf) it should usually have the form: cpu-vendor-os, where os can be system or kernel-system, but for instance powerpc64le-linux-rhel8.4
does not really fit into this syntax.
What determines the convention for that powerpc64le-linux-rhel8.4
case?
(thanks for the info btw)
Well, the release testers run llvm-project/test-release.sh at main · llvm/llvm-project · GitHub with the -triple TRIPLE
option, and they fill in whatever they want. So if you want to use bikeshed-rgb-freebsd
, there’s nothing stopping you! (This was actually the ‘triple’ that used to be compiled into FreeBSD’s svn
binary, when we still used Subversion…)
In any case, I’d normally say that one should use the triple names as output by LLVM itself, but if this makes it impossible to distinguish, say, linux-on-RedHat from linux-on-Ubuntu, it’s probably best to append it. I think that is what the person who produced the powerpc64le-linux-*
variants did.
For some reason I struggled greatly to find this thread again. Thank you for the info! I now understand the names are at the discretion of the testers. Would be nice if there was some consistent pattern but I suppose that can be figured out uniquely for each relese