This is an archive of the discontinued LLVM Phabricator instance.

[WoA][MSVC] Use default linker setting in MSVC-compatible driver [take 2]
ClosedPublic

Authored by maxim-kuvyrkov on Mar 19 2021, 3:00 AM.

Details

Summary

At the moment "link.exe" is hard-coded as default linker in MSVC.cpp,
so there's no way to use LLD as default linker for MSVC driver.

This patch adds checking of CLANG_DEFAULT_LINKER to MSVC.cpp and
updates unit-tests that expect link.exe linker to explicitly select it
via -fuse-ld=link, so that buildbots and other builds that set
-DCLANG_DEFAULT_LINKER=foobar don't fail these tests.

This is a squash of

Diff Detail

Event Timeline

maxim-kuvyrkov requested review of this revision.Mar 19 2021, 3:00 AM
maxim-kuvyrkov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2021, 3:00 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

NFC: Make clang-format happy

This revision is now accepted and ready to land.Mar 19 2021, 6:36 AM
This revision was landed with ongoing or failed builds.Mar 19 2021, 6:38 AM
This revision was automatically updated to reflect the committed changes.

@tstellar

Hi Tom,

This has passed buildbots, so I'll cherry-pick this to release/12.x to fix https://bugs.llvm.org/show_bug.cgi?id=49624