I'm trying to make clang work with musl-libc and LLVM's C++ runtime
stack (libc++, libc++abi, libunwind & compiler-rt) on Linux. Ideally
executables built by this clang should have zero dependency on GCC or
There's just one part that stops me: on Linux, clang always link
executables against libgcc. Though this could be circumvented with
option "-rtlib=compiler-rt", I wish clang could work just out the box.
So, is it possible to add a cmake option to enforce the use of
compiler-rt at build time, just like the existing option
Alternatively, the decision could be made at runtime by checking the
triplet. But a vanilla triplet like "x86_64-linux-musl" is
insufficient; we need a new vendor type, making the triplet look like
"x86_64-no_gnu-linux-musl" or "x86_64-llvm-linux-musl" or something. I
just can't think up a good name for this...