I forgot to answer this:
> Why is -mno-cygwin still be used,
Simply because distutils had no dedicated maintainer for a long time, and because nobody was aware of this change. I don’t think any Python core developer is using Cygwin.
> and is there any reason why it can't be removed?
For distutils, we have to work on eggshells when fixing bugs to make sure we don’t break third-party code that relies on known bugs or works around them. That’s why I propose adding a version check* instead of just removing the option.
* i.e. removing -mno-cygwin if self.gcc_version >= some version