[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
Tue Sep 27 03:12:21 PDT 2022
mgorny added a comment.
In D134337#3817133 <https://reviews.llvm.org/D134337#3817133>, @sepavloff wrote:
> It make sense but the algorithm looks overcomplicated. The current implementation is already too complex and documenting the new algorithm is a challenge.
>
> What about making minimal changes to the current algorithm so that the task of @mgorny can be done, without reasoning about possible profit for someone else? Our customers don't use target overloading and prefixes longer than target, so any change that preserve existing functionality is OK.
Do your customers need all of the current functions? Could you perhaps specify the absolutely minimal algorithm you'd need to work, and I'll try to make the implementation as simple as possible.
> In D134337#3805368 <https://reviews.llvm.org/D134337#3805368>, @mgorny wrote:
>
>> For driver, it will try:
>>
>> 1. `clang++.cfg` (effective mode)
>> 2. `clang.cfg` (suffix)
>
> It must not break compatibility with existing implementation and allows further extension in future. For more complex use cases driver configuration may implement mode complex syntax as proposed in https://discourse.llvm.org/t/rfc-adding-a-default-file-location-to-config-file-support/63606/41.
>
> @mgorny what modifications to target mode file search are necessary for your task?
For my immediate task, I'm perfectly happy with leaving it as-is, as long as it won't get in the way of getting effective driver mode config in. I'm a bit worried that better target support may be useful in the future but I suppose that ship has sailed already.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134337/new/
https://reviews.llvm.org/D134337
More information about the cfe-commits
mailing list