LLVM Clang Gets Support For Configuration Files
Ahead of next week's LLVM 6.0 feature freeze / code branching, the Clang C/C++ compiler front-end has picked up support for the concept of configuration files.
Clang configuration files basically come down to a file that can store multiple parameters to pass to Clang, just as you would otherwise do via the command-line but can now be stored into a text file. The purpose of these Clang configuration files is mainly for cross-compiler arguments or other use-cases where you may otherwise be passing a ton of repeated arguments to Clang.
Clang configuration files can be passed using the --config switch with clang. More details via the documentation added by this commit.
Clang configuration files basically come down to a file that can store multiple parameters to pass to Clang, just as you would otherwise do via the command-line but can now be stored into a text file. The purpose of these Clang configuration files is mainly for cross-compiler arguments or other use-cases where you may otherwise be passing a ton of repeated arguments to Clang.
A configuration file is a collection of driver options, which are inserted into command line before other options specified in the clang invocation. It groups related options together and allows specifying them in simpler, more flexible and less error prone way than just listing the options somewhere in build scripts. Configuration file may be thought as a "macro" that names an option set and is expanded when the driver is called.
Clang configuration files can be passed using the --config switch with clang. More details via the documentation added by this commit.
6 Comments