[PATCH] D53250: [ToolChain] Use default linker if the toolchain uses a custom one

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 14 03:31:14 PDT 2018


Hahnfeld added a comment.

If I read that patch correctly, this will render `-fuse-ld` with non-absolute paths useless if a toolchain has `DefaultLinker != "ld"`. I don't think that's what we want to do if the user explicitly sets a different linker.

In https://reviews.llvm.org/D53250#1264626, @phosek wrote:

> This should avoid workarounds such as https://reviews.llvm.org/D49899 or https://reviews.llvm.org/D53249.


I agree that these changes are ugly, but we do the same with `-stdlib=platform` and `-rtlib=platform` for tests that check Clang's choices for a particular platform. For this case it's what you did in https://reviews.llvm.org/D53249: Adding `-fuse-ld=ld` to tests that check the default linker for a platform. (because there is a case for `UseLinker == "ld"`)


Repository:
  rC Clang

https://reviews.llvm.org/D53250





More information about the cfe-commits mailing list