This is an archive of the discontinued LLVM Phabricator instance.

[CMake][profile] Don't use `TARGET lld` to avoid ordering issues
ClosedPublic

Authored by phosek on Feb 22 2021, 10:24 PM.

Details

Summary

Depending on the order in which lld and compiler-rt projects are
processed by CMake, TARGET lld might evaluate to TRUE or FALSE
even though lld-available lit stanza is always set because lld is
being built. We check whether lld project is enabled instead which
is used by other compiler-rt tests.

The ideal solution here would be to use CMake generator expressions,
but those cannot be used for dependencies yet, see:
https://gitlab.kitware.com/cmake/cmake/-/issues/19467

Diff Detail

Event Timeline

phosek created this revision.Feb 22 2021, 10:24 PM
phosek requested review of this revision.Feb 22 2021, 10:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2021, 10:24 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

This should address the issue that @aeubanks reported on D96757.

MaskRay accepted this revision.Feb 22 2021, 10:29 PM

LGTM.

This revision is now accepted and ready to land.Feb 22 2021, 10:29 PM

I had a similar fix D71950 ;-)