Part of the compilers decoupling epic #5264 (Phase 1).
The mingw compiler injects a bare -O optimization flag. cc1 accepts this for 64-bit builds, but under -m32 it rejects it:
cc1.exe: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
(reported in #4873)
Fix: in distutils/compilers/C/cygwin.py, normalize the bare -O to -O1 (or suppress it when a numbered -O is already present in the flags). Add a regression test and a newsfragment. Ships independently of the rest of Phase 1 — good warm-up.
Closes #4873.
Part of the compilers decoupling epic #5264 (Phase 1).
The mingw compiler injects a bare
-Ooptimization flag.cc1accepts this for 64-bit builds, but under-m32it rejects it:(reported in #4873)
Fix: in
distutils/compilers/C/cygwin.py, normalize the bare-Oto-O1(or suppress it when a numbered-Ois already present in the flags). Add a regression test and a newsfragment. Ships independently of the rest of Phase 1 — good warm-up.Closes #4873.