It's set on all paths that later use it, there is two switches for same set of cases.
You're not using mingw-w64 for tests, are you?