[all-commits] [llvm/llvm-project] 1f67dc: [Driver] Enable nested configuration files

Serge Pavlov via All-commits all-commits at lists.llvm.org
Tue Nov 15 22:33:15 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f67dc8b7c225290d1b3eb93d90e2c9861aeefc0
      https://github.com/llvm/llvm-project/commit/1f67dc8b7c225290d1b3eb93d90e2c9861aeefc0
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

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

  Log Message:
  -----------
  [Driver] Enable nested configuration files

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.

Differential Revision: https://reviews.llvm.org/D136354




More information about the All-commits mailing list