[all-commits] [llvm/llvm-project] 9d37d0: [Support] Expand `<CFGDIR>` as the base directory ...

Jack Andersen via All-commits all-commits at lists.llvm.org
Thu Dec 30 10:45:18 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d37d0ea34858288faf6351b9bdc0a0b91107c82
      https://github.com/llvm/llvm-project/commit/9d37d0ea34858288faf6351b9bdc0a0b91107c82
  Author: Jack Andersen <jackoalan at gmail.com>
  Date:   2021-12-30 (Thu, 30 Dec 2021)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/docs/UsersManual.rst
    M clang/lib/Tooling/ExpandResponseFilesCompilationDatabase.cpp
    M llvm/include/llvm/Support/CommandLine.h
    M llvm/lib/Support/CommandLine.cpp
    M llvm/unittests/Support/CommandLineTest.cpp

  Log Message:
  -----------
  [Support] Expand `<CFGDIR>` as the base directory in configuration files.

Extends response file expansion to recognize `<CFGDIR>` and expand to the
current file's directory. This makes it much easier to author clang config
files rooted in portable, potentially not-installed SDK directories.

A typical use case may be something like the following:

```
# sample_sdk.cfg
--target=sample
-isystem <CFGDIR>/include
-L <CFGDIR>/lib
-T <CFGDIR>/ldscripts/link.ld
```

Reviewed By: sepavloff

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




More information about the All-commits mailing list