def get_proto_arguments(protos, genfiles_dir_path):
    """Get the protoc arguments specifying which protos to compile."""
    arguments = []
    for proto in protos:
        massaged_path = proto.path
        if massaged_path.startswith(genfiles_dir_path):
            massaged_path = proto.path[len(genfiles_dir_path) + 1:]
        arguments.append(massaged_path)
    return arguments