def METHOD_NAME(repo_ctx, cc, option, pattern):
    """Checks that `option` is supported by the C linker."""
    result = repo_ctx.execute([
        cc,
        option,
        "-o",
        "/dev/null",
        str(repo_ctx.path(TEST_CPP_FILE)),
    ])
    return result.stderr.find(pattern) == -1