bpo-34212: Adds -DPy_BUILD_CORE_BUILTIN for modules statically linked into libpython by embray · Pull Request #8446 · python/cpython
I'm not happy with this solution since the -DPy_BUILD_CORE_BUILTIN is required for every module built into libpython that doesn't already define -DPy_BUILD_CORE. So perhaps this should be done automatically, such as by Modules/makesetup, though I'm mildly afraid to touch that...
This along with #8445 are the minimal needed for Python 3.7+ to build on Cygwin again.