Just the other day, I upgraded XCode to version 10, and it broke my ability to install anything using XS. Today I found this article on Perl Weekly: http://blogs.perl.org/users/atoomic/2018/10/using-perlbrew-after-macos-mojave-1014-update.html
It would appear that Mojave updates XCode, but the update can be applied separately. The important detail is that XCode 10 removes libgcc from the system, on which absence linking suddenly fails.
Perl advertises "LD = env MACOSX_DEPLOYMENT_TARGET=10.3 cc"; fixing this involves getting "10.3" changed to something more useful. I'm still wrapping my head around the details of implementing a workable fix for me. Read the article for clues.