Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lld as linker #4170

Closed
lizan opened this issue Aug 15, 2018 · 5 comments
Closed

Use lld as linker #4170

lizan opened this issue Aug 15, 2018 · 5 comments
Labels
Milestone

Comments

@lizan
Copy link
Member

lizan commented Aug 15, 2018

As a part of tool chain revisit (#4159, #4158) and also as a part of (#3741). We should consider use LLD as default linker. LLD is at least twice faster than gold linker, we have more than 300 test target to link so this will improve CI performance.

Options:

  1. Use lld everywhere (it works with gcc)
  2. Use lld where clang is used (sanitizers)

A sample benchmark of linking envoy-static is here:

gold w/o threads (current):
12.01s user 1.32s system 99% cpu 13.358 total

gold w/ threads:
14.24s user 6.97s system 180% cpu 11.762 total

lld w/o threads:
3.63s user 1.15s system 99% cpu 4.805 total

lld w/ threads:
8.64s user 11.24s system 709% cpu 2.802 total

@mattklein123 mattklein123 added this to the 1.8.0 milestone Aug 16, 2018
@mattklein123
Copy link
Member

@lizan +1 I think we should switch to lld everywhere, especially if we switch the release build over to clang.

htuch pushed a commit that referenced this issue Sep 20, 2018
Use lld in clang builds (ASAN/TSAN) #4170

Risk Level: Low (not in release)
Testing: ci
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Lizan Zhou <zlizan@google.com>
@mattklein123
Copy link
Member

This is done.

@lizan
Copy link
Member Author

lizan commented Sep 21, 2018

@mattklein123 This is done for 2., I would like to still keep this open for 1.?

@lizan lizan reopened this Sep 21, 2018
@mattklein123
Copy link
Member

Ah ok. SGTM.

@mattklein123 mattklein123 modified the milestones: 1.8.0, 1.9.0 Sep 21, 2018
@htuch
Copy link
Member

htuch commented Sep 21, 2018

@lizan what if we do this; we point tools/bazel.rc at a shell script that detects if lld is present and uses that by default, otherwise falls backs to ld?

@mattklein123 mattklein123 modified the milestones: 1.9.0, 1.10.0 Dec 14, 2018
lizan added a commit that referenced this issue Feb 12, 2019
*Description*:
Fixes #4170 

*Risk Level*: Low
*Testing*: CI
*Docs Changes*:
*Release Notes*: Added

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
fredlas pushed a commit to fredlas/envoy that referenced this issue Mar 5, 2019
*Description*:
Fixes envoyproxy#4170 

*Risk Level*: Low
*Testing*: CI
*Docs Changes*:
*Release Notes*: Added

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Fred Douglas <fredlas@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants