def METHOD_NAME(basedir, src, compiler, **compiler_attrs):
    """Make sure src compiles and links successfully.
    The resulting binary is deleted without being run.
    """
    if not os.path.exists(basedir):
        os.makedirs(basedir)
    cfile = pjoin(basedir, os.path.basename(src))
    shutil.copy(src, cfile)
    try:
        efile = test_compilation(cfile, compiler=compiler, **compiler_attrs)
    finally:
        shutil.rmtree(basedir)