build: only apply linker flags for C/C++
When building C/C++ code we need to add `/debug` to the flags. However,
if we are building Swift code, this becomes a problem as the flag is
passed to the Swift compiler directly. Only pass the flag when C/C++
code is being built.