This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][amdcgn] Only add opt/llvm-link dependency if TARGET is available
ClosedPublic

Authored by protze.joachim on Aug 28 2021, 7:45 AM.

Details

Summary

In some build configurations, the target we depend on is not available for declaring the build dependency.
We only need to declare the build dependency, if the build target is available in the same build.

Should fix the issue raised in https://reviews.llvm.org/D107156#2969862
This patch should go into release/13 together with D108404

If the patch is accepted, please go ahead and commit - I might not be available for the next week.

Diff Detail

Event Timeline

protze.joachim created this revision.Aug 28 2021, 7:45 AM
protze.joachim requested review of this revision.Aug 28 2021, 7:45 AM
Herald added a project: Restricted Project. · View Herald Transcript
JonChesterfield accepted this revision.Aug 28 2021, 8:16 AM

Looks reasonable to me, thanks for the patch!

This revision is now accepted and ready to land.Aug 28 2021, 8:16 AM

From my understanding, we probably want a more precise way. When building with LLVM_ENABLE_RUNTIMES, opt and llvm-link have to be targets, and they have to be added into dependences. For standalone build, opt and llvm-link have to be paths to two binaries.

raj.khem accepted this revision.Aug 28 2021, 2:04 PM

I verified both patches together on latest 13.x branch and it fixes the issue I was seeing. So please apply both the fixes suggested in description to 13.x branch.