This fixes `Host compiler does not support '-fuse-ld=lld'` error when cross-build libclc for gpu target. Cmake configure command is: -DRUNTIMES_amdgcn-amd-amdhsa-llvm_LLVM_ENABLE_RUNTIMES=libclc \ -DLLVM_RUNTIME_TARGETS="amdgcn-amd-amdhsa-llvm" libclc targets only support offload target cross-build and can't link host executable. The configuration error is false positive for offload. This PR adds a baseline test to first check if the target can link executable. If it fails (typical for gpu/offload), we skip the custom linker validation.
See docs/CMake.html for instructions on how to build LLVM with CMake.