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.
The only odd one out is, as usual, Windows. Which uses
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
(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.