This is an archive of the discontinued LLVM Phabricator instance.

Properly support LLVM_ENABLE_LLD on Windows
ClosedPublic

Authored by serge-sans-paille on Dec 22 2022, 2:00 AM.

Details

Summary

Currently, setting -DLLVM_ENABLE_LLD=ON on windows also requires setting
-DCMAKE_LINKER=lld-link.exe. This is both misleading and redundant.

Fix this by trying to find llvm-link.exe when -DLLVM_ENABLE_LLD=ON is
set and CMAKE_LINKER is not, and aborting otherwise.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 2:00 AM
serge-sans-paille requested review of this revision.Dec 22 2022, 2:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 2:00 AM
RKSimon added a reviewer: rnk.Dec 22 2022, 2:34 AM
phosek accepted this revision.Dec 22 2022, 7:09 AM

LGTM

llvm/cmake/modules/HandleLLVMOptions.cmake
307

Nit: I'd use a slightly different phrasing.

This revision is now accepted and ready to land.Dec 22 2022, 7:09 AM
This revision was automatically updated to reflect the committed changes.