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 a linker #10762

Merged
merged 3 commits into from
Apr 21, 2022
Merged

Use LLD as a linker #10762

merged 3 commits into from
Apr 21, 2022

Conversation

Firobe
Copy link
Contributor

@Firobe Firobe commented Apr 19, 2022

Analysis in #10503 has shown that switching from the GNU linker to LLVM's lld improves build times, especially when building incrementally (where linking is a significant bottleneck).

This PR makes that change by:

  • adding lld to the toolchain
  • passing a global compiler flag for the internal code, to use lld
  • adapting ocaml-rocksdb so that it correctly links with lld, which is more strict than the GNU linker with respect to duplicate symbols

Closes #10761

@Firobe Firobe self-assigned this Apr 19, 2022
@Firobe Firobe added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Apr 19, 2022
@Firobe Firobe changed the title [WIP] Use lld as a linker [WIP] Use LLD as a linker Apr 19, 2022
@Firobe
Copy link
Contributor Author

Firobe commented Apr 19, 2022

CI seems to pass except for merging into develop due to changed container images

@Firobe Firobe marked this pull request as ready for review April 19, 2022 19:20
@Firobe Firobe changed the title [WIP] Use LLD as a linker Use LLD as a linker Apr 19, 2022
Copy link
Contributor

@lk86 lk86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just a few comments / questions for my own understanding

dockerfiles/stages/1-build-deps Show resolved Hide resolved
@Firobe
Copy link
Contributor Author

Firobe commented Apr 21, 2022

Ready to merge when #10768 is merged.

@Firobe Firobe merged commit 2df4683 into compatible Apr 21, 2022
@Firobe Firobe deleted the feature/link-with-lld branch April 21, 2022 19:56
@robinbb robinbb added the Tweag label Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants