This is an archive of the discontinued LLVM Phabricator instance.

lld/cmake: Drop use of llvm-config for LLVM install discovery
ClosedPublic

Authored by Ericson2314 on Aug 3 2022, 11:34 PM.

Details

Summary

This has been deprecated since D116492 earlier in 2022.

That seems recent, but with the recent cut of LLVM 15 that is still two releases (14 and 15). Meanwhile Clang has deprecated llvm-config for a lot longer, and since it is likely that LLD users are also Clang users, this serves as an extra "heads up" that llvm-config is on its way out.

Remove it in favor of using CMake's find_package() function.

Diff Detail

Event Timeline

tstellar created this revision.Aug 3 2022, 11:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2022, 11:34 PM
tstellar requested review of this revision.Aug 3 2022, 11:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2022, 11:34 PM
MaskRay accepted this revision.Aug 3 2022, 11:48 PM
This revision is now accepted and ready to land.Aug 3 2022, 11:48 PM

I just found D130735, which is essentially the same patch.

Ericson2314 accepted this revision.Aug 4 2022, 5:20 AM
Ericson2314 edited the summary of this revision. (Show Details)Aug 6 2022, 6:37 AM
Ericson2314 commandeered this revision.Aug 6 2022, 6:40 AM
Ericson2314 edited reviewers, added: tstellar; removed: Ericson2314.

Add my changes but split to just LLD as @tstellar requested

mgorny accepted this revision.Aug 6 2022, 9:25 AM

LGTM at a first glance, and it doesn't seem to break Gentoo, so it must be good ;-).

This revision was automatically updated to reflect the committed changes.