On Windows a build with BUILD_SHARED_LIBS=ON needs to store the dependencies between libraries, due to the import libraries that (.a/.lib) that Windows needs to have for DLL files.
The dependencies will also be available in the cmake files.
llvm\unittests\Passes needs "Core" as LLVM_LINK_COMPONENTS, otherwise it won't link.