[PATCH] D132444: [clang] Allow using -rtlib=platform to switching to the default rtlib on all targets

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 24 00:27:04 PDT 2022


phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.

LGTM

In D132444#3743051 <https://reviews.llvm.org/D132444#3743051>, @mstorsjo wrote:

> In D132444#3743020 <https://reviews.llvm.org/D132444#3743020>, @thakis wrote:
>
>> Makes sense to me. Maybe @hans has an opinion too.
>>
>> WDYT about accepting the same string for -fuse-ld= to mean "platform linker" there as well?
>
> Sounds reasonable to me - requiring the user to set an option to the empty string is kinda awkward.

We currently support `-fuse-ld=` and `-fuse-ld=ld`, see https://github.com/llvm/llvm-project/blob/e29f9f7572d75c25cf06b080dce6bda9ebcf5008/clang/lib/Driver/ToolChain.cpp#L644. I think that `-fuse-ld=platform` would be less confusing (to distinguish from `ld` as the linker name) and it's also more consistent with other flags.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132444/new/

https://reviews.llvm.org/D132444



More information about the cfe-commits mailing list