[Chapel Merge] Set the find_package path for dyno linters

Branch: refs/heads/main
Revision: a79144c
Author: aconsroe-hpe
Link: Set the find_package path for dyno linters by aconsroe-hpe · Pull Request #19383 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19383 from aconsroe-hpe/fix/dyno-linter-cmake-split-versioning

Set the find_package path for dyno linters

reviewed by @mppf

In #19232, we encountered an issue where find_package from cmake
throws an uncatchable error because of multiple llvm/clang versions
installed and the way Ubuntu packages them, which looks like

CMake Error at /usr/lib/llvm-12/lib/cmake/clang/ClangTargets.cmake:699 (message):
  The imported target "clangBasic" references the file

     "/usr/lib/llvm-12/lib/libclangBasic.a"
...

This then reoccurred due to Github runner version changes which
changed the packages available by default.

The fix here is to explicitly pass the find_package search path by
setting the new cmake option DYNO_LINTERS_CLANG_CMAKE_PATH which we
compute using llvm-config --cmakedir using the llvm-config as
determined by CHPL_LLVM

Modified Files:
M compiler/dyno/Makefile.help

M compiler/dyno/util/linters/CMakeLists.txt

Compare: https://github.com/chapel-lang/chapel/compare/5f9ad906f707...a79144c35a5e