This is an archive of the discontinued LLVM Phabricator instance.

[LLVM] Add LLVM_ENABLE_LLD option to use LLD as C/C++ linker.
ClosedPublic

Authored by Eugene.Zelenko on Jul 27 2016, 6:23 PM.

Details

Summary

Probably CMAKE_MODULE_LINKER_FLAGS should be changed too, but I'm not sure how to check it and how well LLD handles modules.

I checked this patch on my own build on RHEL 6. Regressions were OK.

Diff Detail

Repository
rL LLVM

Event Timeline

Eugene.Zelenko retitled this revision from to [LLVM] Add LLVM_ENABLE_LLD option to use LLD as C/C++ linker..
Eugene.Zelenko updated this object.
Eugene.Zelenko added a reviewer: compnerd.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added a subscriber: llvm-commits.
compnerd requested changes to this revision.Jul 27 2016, 6:40 PM
compnerd edited edge metadata.
compnerd added inline comments.
cmake/modules/HandleLLVMOptions.cmake
15 ↗(On Diff #65851)

Why the whitespace removal?

112 ↗(On Diff #65851)

Why the whitespace removal?

148 ↗(On Diff #65851)

We need CMAKE_MODULE_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS. This probably works well enough right now due to the fact that the default configuration does not use shared libraries.

This revision now requires changes to proceed.Jul 27 2016, 6:40 PM
Eugene.Zelenko added inline comments.Jul 27 2016, 6:59 PM
cmake/modules/HandleLLVMOptions.cmake
15 ↗(On Diff #65851)

Is it really necessary? I don't see any logic behind. Same for white space below.

15 ↗(On Diff #65851)

Is it really necessary? I don't see any logic behind. Same for white space below.

Eugene.Zelenko edited edge metadata.

Also use LLD for CMAKE_MODULE_LINKER_FLAGS.

compnerd accepted this revision.Jul 28 2016, 5:42 PM
compnerd edited edge metadata.

Please undo the whitespace changes, they make the file harder to follow.

This revision is now accepted and ready to land.Jul 28 2016, 5:42 PM

Will undo white space changes at commit. Just wanted to make white space consistent.

This revision was automatically updated to reflect the committed changes.