lld链接器是否可以替代ld和gold? [英] Is the lld linker a drop-in replacement for ld and gold?

查看:990
本文介绍了lld链接器是否可以替代ld和gold?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LLVM项目中的链接器 lld当前是在开发中,并且每周都在增加新功能.它的开发人员保证lldld更快.与gold相比,它如何竞争?

The linker from the LLVM project lld is currently developed with new features added week by week. Its developers promise that lld is faster than ld. How does it compete compared to gold?

是否可以直接替换ld?有了黄金,有些圈子就可以跳过.

Is lld a drop-in replacement for ld? With gold there are some hoops to jump through.

推荐答案

其中一位LLD开发人员Uiyama Rui回顾了LLD在2016年取得的进展,请参见

One of the LLD developers, Rui Ueyama, looks back at the progress LLD did in 2016, see http://lists.llvm.org/pipermail/llvm-dev/2016-December/107981.html.

  • "Now I'm pretty sure that that [LLD] is going to be a serious (and better, in my opinion) alternative to the existing GNU linkers [..]."
  • "LLD is now able to link most x86-64 userland programs."
  • "The FreeBSD project and we are trying to make LLD the system default linker of the operating system, and except a few tricky programs such as the kernel or a bootloader, the linker works mostly fine." Already achieved!
  • "LLD supports x86, x86-64, x32, AArch64, AMDGPU, ARM, PPC64 and MIPS32/64, though completeness varies."
  • "[T]here are already a few systems that are using LLD as system linkers, such as CloudABI or Fuchsia. Chromium and Clang/LLVM itself has build options to use LLD to build them."

而且,作为奖励:

  • "LLD变得更快[..]今年年初, LLD花费了大约16秒的时间来生成1.5 GB的clang(调试版本) 可执行文件.现在,单核大约需要14.5秒,而8.5秒 在20个核心上. ld.gold大约需要25秒和20秒, 分别. [..]如果您有链接时间过长的问题,建议您尝试LLD."
  • "LLD got faster [..] At the beginning of this year, LLD took about 16 seconds to produce a 1.5 GB clang (debug build) executable. Now, it takes about 14.5 seconds on single core and 8.5 seconds on 20 cores. ld.gold takes about 25 seconds and 20 seconds, respectively. [..] If you have a problem of too long link time, I'd recommend to try LLD."

2017年春季更新,据一位开发人员称:"LLD/ELF现在已经准备好用于x86-64(可能还有AArch64和MIPS)的生产环境.",请参阅 http://lists.llvm.org/pipermail/llvm-dev/2017- March/111083.html 它还简要介绍了如何使用LLD.

Update spring 2017 According to one of the developers "LLD/ELF is now ready for production use at least for x86-64 (and probably for AArch64 and MIPS).", see http://lists.llvm.org/pipermail/llvm-dev/2017-March/111083.html It also contains a brief description on how to make use of LLD.

这篇关于lld链接器是否可以替代ld和gold?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆