Skip to content

Use lld as linker #4170

@lizan

Description

@lizan

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions