This is required when using the in-tree clang for building tests,
because -fuse-ld=lld is used by default.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Not sure lld is the default? I think I always build with bfd (or gold).
I'll check later today when I'm in the office. I'm not against this change per se, but adding another dependency seems annoying. cc: @zturner
@davide: I agree, the extra dependency is annoying.
FWIW, I was trying to run tests on Windows and nothing worked because lld wasn't built. Maybe the behavior is different on Windows and on other hosts? I just assumed this was the new default because I saw a couple of changes to how tests are run recently.
lld is required for building windows inferiors, but that can't be the case elsewhere (I don't even have lld checked out). It's possible it gets somehow auto-selected by clang when you have lld checked out, but if that's the case than you need to detect it, and enable the dependency only then.
Do we want to add an option to our build system to try LLD where it is supported? Doesn't need to be part of this patch, but it would be great to be able to try it out on ELF based systems.
test/CMakeLists.txt | ||
---|---|---|
116–122 ↗ | (On Diff #121750) | I would probably move this outside of the if (TARGET clang). This is minor though, as I can think of ways to break this both with the current patch (inside of the check) as well as outside of the check. |