[PATCH] D136354: [Driver] Enable nested configuration files

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 07:12:04 PDT 2022


sepavloff created this revision.
sepavloff added reviewers: aaron.ballman, kadircet, MaskRay, mgorny.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
sepavloff requested review of this revision.
Herald added projects: clang, LLVM.
Herald added a subscriber: llvm-commits.

Users may partition parameters specified by configuration file and put
different groups into separate files. These files are inserted into the
main file using constructs `@file`. Relative file names in it are
resolved relative to the including configuration file and this is not
convenient in some cases. A configuration file, which resides in system
directory, may need to include a file with user-defined parameters and
still provide default definitions if such file is absent.

To solve such problems, the option `--config` is allowed inside
configuration files. Like `@file` it results in insertion of
command-line arguments but the algorithm of file search is different and
allows overriding system definitions with user ones.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136354

Files:
  clang/docs/UsersManual.rst
  clang/include/clang/Basic/DiagnosticDriverKinds.td
  clang/lib/Driver/Driver.cpp
  clang/test/Driver/Inputs/config-6.cfg
  clang/test/Driver/config-file-errs.c
  clang/test/Driver/config-file.c
  clang/unittests/Driver/ToolChainTest.cpp
  llvm/lib/Support/CommandLine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136354.469220.patch
Type: text/x-patch
Size: 9417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221020/74a9f84d/attachment.bin>


More information about the cfe-commits mailing list