When LLVM_ENABLE_PIC = OFF, shared libraries cannot be built against code that's compiled without -fPIC. Example error message:
ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC >>> defined in lib/libLLVMSupport.a(StringMap.cpp.o) >>> referenced by StringMap.cpp >>> StringMap.cpp.o:(llvm::StringMapImpl::StringMapImpl(unsigned int, unsigned int)) in archive lib/libLLVMSupport.a
Similar to how libclang handles this, skip building these shared libraries when LLVM_ENABLE_PIC = OFF.