Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for components available only in LLVM shared library
LLVM components may be built as individual libraries/archives, included in the LLVM shared library or both. Some distros such as Ubuntu (at least 20.04) does both, others such as Arch ships only the shared library. The latter causes issues when trying to link Mull against components such as clangTooling and clangCodeGen as they are not available on the system. LLVM allows for checking whether the shared lib was built at all through LLVM_LINK_LLVM_DYLIB and, if it were, which components were included in it through LLVM_DYLIB_COMPONENTS. This commit attempts to leverage these variables in order to select the appropriate library to link against. If the component in question is included in the shared library, linking against the latter is always preferred. If the component is not included in the shared library, or if the library doesn't exist at all, linking is done against the individual component lib/archive.
- Loading branch information
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters