[PATCH] D24933: Enable configuration files in clang

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 11:50:32 PDT 2017


sepavloff marked 3 inline comments as done.
sepavloff added inline comments.


================
Comment at: lib/Driver/Driver.cpp:739
+      // like: i386-clang.cfg -> x86_64-clang.cfg.
+      if (ArchPrefixLen < CfgFileName.size())
+        FixedConfigFile += CfgFileName.substr(ArchPrefixLen);
----------------
hfinkel wrote:
> I don't see how this length check makes sense in all cases. If CfgFileName came from a --config command-line options, whether or not it is longer or shoter than ArchPrefixLen seems irrelevant. Do you need to do some prefix check here?
Indeed, this feature require further elaboration. We are going to treat config file specified by `--config` with higher priority, but actually we can have even more complex combination, something like:
    mips64-clang --config mips32 -target x86 -m32
Nevertheless such call must be consistently processed.

I will implement the relevant functionality two weeks later, after return from vacation.


https://reviews.llvm.org/D24933





More information about the cfe-commits mailing list