Currently is_flag_supported creates a new cfg to detect whether the given flag could be accepted, inheriting some configurations (target, host, cpp etc.) except compiler. This means though the compiler to use may have been specified explicitly, the flag is still tested with the default compiler instead, resulting in wrong configurations.