[PATCH] D134337: [clang] [Driver] More flexible rules for loading default configs (WIP)

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 26 08:55:16 PDT 2022


mgorny added a comment.

In D134337#3815339 <https://reviews.llvm.org/D134337#3815339>, @sepavloff wrote:

> In D134337#3805368 <https://reviews.llvm.org/D134337#3805368>, @mgorny wrote:
>
>> For target, it will try:
>>
>> 1. `i386.cfg` (effective triple)
>> 2. `i386-pc-linux-gnu.cfg` ("fixed" prefix)
>> 3. `x86_64-pc-linux-gnu.cfg` (orig. prefix)
>
> Does it mean that `i386.cfg` would be tried before `i386-pc-linux-gnu.cfg`? It looks more natural to try specific variant first then generic. File `x86_64.cfg` is not used in this algorithm, what is the reason for this?

Yes but this is only because the example explicitly passes `-target i386`, i.e. incompletely triple. If you passed `-target i386-pc-linux-gnu`, then it would try that one instead. Perhaps I should try and see what triple normalization does here.


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

https://reviews.llvm.org/D134337



More information about the cfe-commits mailing list