llvm-jitlink and llvm-jitlink-executor make use of APIs that are part of the socket and nsl libraries on SunOS systems (Solaris and Illumos). Make sure they get linked.
Ran into this in Rust CI when cross-compiling LLVM 12 to these targets.
My cmake-foo is rather weak, so I took inspiration from this check for SunOS: https://github.com/llvm/llvm-project/blob/ca5247bb1770a1dfa56b78303d99f1cc9a0a06ee/llvm/utils/benchmark/src/CMakeLists.txt#L43-L45
Are socket and nsl libraries standard and always available, or should we check for them?