[CMake] Look up target subcomponents in LLVM_AVAILABLE_LIBS
authorAaron Puchert <aaronpuchert@alice-dsl.net>
Sun, 22 Jan 2023 20:35:09 +0000 (21:35 +0100)
committerAaron Puchert <aaronpuchert@alice-dsl.net>
Sun, 22 Jan 2023 20:36:26 +0000 (21:36 +0100)
commit0b5cb41dd07cc7cde9330d6098ebd74387f3df7f
tree8c01fd9ce5bf5ea0ba19bb173947f86cf220ca7d
parent0cdf030cf8dcfb8bfe551c16b14a29e124497069
[CMake] Look up target subcomponents in LLVM_AVAILABLE_LIBS

In an installation using the all-contained libLLVM.so, individual
components are not available as targets, so we have to look them up in
LLVM_AVAILABLE_LIBS just like llvm_map_components_to_libnames does it.
Here I don't think we need the capitalized names though because we know
the right capitalization. But I might be wrong.

This is required by dragonffi, who call llvm_map_components_to_libnames
on a list containing ${LLVM_NATIVE_ARCH}. Downstream bug report:
https://bugzilla.opensuse.org/show_bug.cgi?id=1180748.

Differential Revision: https://reviews.llvm.org/D96670
llvm/cmake/modules/LLVM-Config.cmake