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
Response and configuration files are different things, so the documentation must more specific what facility is extended.
According to this implementation the response file treatment is extended. During development of configuration files couple of attempts were taken to extend the functionality of response files (see for example https://reviews.llvm.org/D36045). They were rejected as breaking compatibility with gcc. It does not mean that such extending is not possible, but it should be discussed in wider community. There must be serious reason for such extension and significant use case.
As for using this feature for configuration files, it does not look as very helpful. Configuration files are searched for in several places and the first found file is used. In this case specification of various locations relative to the config-file does not look neither safe nor natural. Specific use case also would be helpful to ground the need for such extension.