I prefer compilation errors over link errors, and the reason is mostly historical. In the past, link errors were really hard to figure out. They would spew out mangled symbols and did not provide clear direction on which source files were affected, which is understandable since the linker only knows about object files, libraries, and dynamic libraries.

Nowadays, it is way better, but I still prefer getting compilation errors over link errors. For that reason, I believe build systems should not have the capability to conditionally add or remove source code files from the build. This should happen with macros like #ifdef LINUX or #ifdef WINDOWS.

Next - Previous