def has_flag(compiler, flags):
import tempfile<EOL>with tempfile.NamedTemporaryFile('<STR_LIT:w>', suffix='<STR_LIT>') as f:<EOL><INDENT>f.write('<STR_LIT>')<EOL>try:<EOL><INDENT>compiler.compile([f.name], extra_postargs=flags)<EOL><DEDENT>except setuptools.distutils.errors.CompileError:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Return a boolean indicating whether a flag name is supported on
    the specified compiler.