Support for Clang on Solaris missing
I recently tried a 2-stage build of llvm trunk on Solaris 11.5 Beta. While the first stage (using gcc 9 as host compiler) worked fine, during stage 2 (when llvm is built using the just compiled clang), quite a number of tests failed to find libclang.so at runtime.
After a long hunt, I found that cmake simply lacks support for Clang on Solaris, so
no option to the the RPATH
was known. Handling this along the lines of Modules/Platform/Linux-Clang-C.cmake
:
SunOS-Clang-C.cmake
:
include(Platform/SunOS-GNU-C)
SunOS-Clang-CXX.cmake
:
include(Platform/SunOS-GNU-CXX)
Adding those files fixed all those clang test failures due to missing RPATH.