

def _link_library(self, target, results_dir, objects):
    output = self._libpath(target, results_dir)
    cmd = [self.cpp_toolchain.register_tool('ar')]
    cmd.extend(['rcs'])
    cmd.extend([output])
    cmd.extend(objects)
    with self.context.new_workunit(name='cpp-link', labels=[WorkUnitLabel.COMPILER]) as workunit:
        self.run_command(cmd, workunit)
    return output

dataset/ETHPy150Open pantsbuild/pants/contrib/cpp/src/python/pants/contrib/cpp/tasks/cpp_library_create.py CppLibraryCreate._link_library/original