LNT always using clang++ as linker command


I’m using LNT to run the llvm nightly tests. When it’s compiling the tests, it seems to always use the clang++ driver as the linker command instead of clang, even for tests that are pure C code. This makes all the binaries depend on libstdc++, which isn’t great.

This happens even if I specify --disable-cxx. The only way around it seems to be to also specify clang as the C++ compiler (using --cxx), but then a few of the tests still add “-lstdc++”.

Just as a heads-up, we’re running lnt in a cross-compiler setup. That is, lnt runs on an x86 host and compiles for a PPC target where tests are executed remotely (–remote). The lnt command is something like: lnt runtest nt --sandbox SANDBOX --cc CLANG --test-suite TESTSUITE --remote --remote-host XYZ --remote-port 22 --remote-user XYZ --arch ppc32 --cflag “–sysroot=XYZ -target XYZ”

Is this a bug or a feature? :wink: