[PATCH] D134270: [clang] [Driver] Support multiple configuration files

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 20 23:05:30 PDT 2022


mgorny added a comment.

In D134270#3804855 <https://reviews.llvm.org/D134270#3804855>, @sepavloff wrote:

> What about the case, when executable file has a target prefix (so implicit config file may be used) and the option `--config` is specified in command line? Now this case becomes possible and we should either reject it (because explicit config files have precedence)

Rejecting sounds like a bad idea. We should certainly allow `--config` to be used, independently of whether prefixed executable is to be used and whether the vendor supplies default configs.

> or support it (because configuration is built up of a few files). I would be inclined to the first variant but there could be use cases for the other. In any case it worth to be documented.

Yeah, it could make sense to use default configs unconditionally now. In the end, we have `--no-default-config` to override that. I'll update the patch to do that.



================
Comment at: clang/lib/Driver/Driver.cpp:990
 
 bool Driver::loadConfigFile() {
   // Process options that change search path for config files.
----------------
sepavloff wrote:
> Maybe rename it to `loadConfigFiles`?
Will do.


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

https://reviews.llvm.org/D134270



More information about the cfe-commits mailing list