This is an archive of the discontinued LLVM Phabricator instance.

Add a dependency from check-lldb on lld
ClosedPublic

Authored by sas on Nov 6 2017, 9:08 AM.

Details

Summary

This is required when using the in-tree clang for building tests,
because -fuse-ld=lld is used by default.

Diff Detail

Repository
rL LLVM

Event Timeline

sas created this revision.Nov 6 2017, 9:08 AM
sas added a subscriber: lldb-commits.
davide edited edge metadata.Nov 6 2017, 9:22 AM
davide added a subscriber: zturner.

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

sas added a comment.Nov 6 2017, 9:29 AM

@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.

labath requested changes to this revision.Nov 6 2017, 9:31 AM
labath added a subscriber: labath.

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.

This revision now requires changes to proceed.Nov 6 2017, 9:31 AM
sas updated this revision to Diff 121750.Nov 6 2017, 9:47 AM
sas edited edge metadata.

Check only on Windows.

labath accepted this revision.Nov 6 2017, 9:53 AM
This revision is now accepted and ready to land.Nov 6 2017, 9:53 AM
clayborg accepted this revision.Nov 6 2017, 10:19 AM

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.

zturner accepted this revision.Nov 6 2017, 10:22 AM
zturner added inline comments.
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.

sas updated this revision to Diff 121760.Nov 6 2017, 11:15 AM

Move check out of if (TARGET clang) block.

This revision was automatically updated to reflect the committed changes.