As I explained on an SSWG update a year ago (April 14th, 2021 - #18 by RemiBardon) I work at Clever Cloud and we'd like to add support for Swift. I was busy with other subjects, but now I'm back on the subject, and I'm hitting the same issue: Download Swift only proposes downloads for macOS, Ubuntu, CentOS, Amazon Linux and Windows.
So my question is very straightforward: what would it mean / require to add support for Exherbo?
Largely I think that the complexity is going to be in the exheres; the build system is pretty complicated and not very amenable to the exheres model. Using CMake directly rather than build-script should make it easier, particularly the cmake exlib. At that point, the problem will become the conflict between LLVM/clang/lldb/lld and the Swift forks of them. Once that is sorted out, personally, I would like to see a similar split to Windows and the rest of the exherbo packages (i.e. gcc vs libstdc++, etc) and have the runtime and compiler be split up (with possible changes for so versioning to aid slotting).
With those handled, I think that it might be possible to stand up a version of Swift that works well on exherbo (including docker images). Subsequent work would be needed for musl as the system libc, but we should at least be able to cover {x86_64,armv7,aarch}-unknown-linux-gnu targets just fine.
First, I am trying to build the Swift toolchain on Exherbo, to see where it breaks.
I had to remove the --test flag, as some tests were failing.
Now, I get
/bin/sh: line 1: /home/bas/swift-project/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./bin/swift-def-to-yaml-converter: No such file or directory