]> granicus.if.org Git - clang/commit
Enable configuration files in clang
authorSerge Pavlov <sepavloff@gmail.com>
Mon, 1 Jan 2018 13:27:01 +0000 (13:27 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Mon, 1 Jan 2018 13:27:01 +0000 (13:27 +0000)
commit5f7f2c06ee10be2b2b9f53d61d12d06fb7be3ff6
treebda254990323d7bfebc1f0ee6c878dacba3606e6
parent20f9e21530dc55f3d9e5910787cdc49f17c060ff
Enable configuration files in clang

Clang is inherently a cross compiler and can generate code for any target
enabled during build. It however requires to specify many parameters in the
invocation, which could be hardcoded during configuration process in the
case of single-target compiler. The purpose of configuration files is to
make specifying clang arguments easier.

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.

Use of configuration files is described in `UserManual.rst`.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321621 91177308-0d34-0410-b5e6-96231b3b80d8
25 files changed:
docs/UsersManual.rst
include/clang/Basic/DiagnosticDriverKinds.td
include/clang/Config/config.h.cmake
include/clang/Driver/Driver.h
include/clang/Driver/Options.td
lib/Driver/Driver.cpp
test/Driver/Inputs/config-1.cfg [new file with mode: 0644]
test/Driver/Inputs/config-2.cfg [new file with mode: 0644]
test/Driver/Inputs/config-2a.cfg [new file with mode: 0644]
test/Driver/Inputs/config-3.cfg [new file with mode: 0644]
test/Driver/Inputs/config-4.cfg [new file with mode: 0644]
test/Driver/Inputs/config-5.cfg [new file with mode: 0644]
test/Driver/Inputs/config-6.cfg [new file with mode: 0644]
test/Driver/Inputs/config/config-4.cfg [new file with mode: 0644]
test/Driver/Inputs/config/i386-qqq.cfg [new file with mode: 0644]
test/Driver/Inputs/config/i386-qqq3.cfg [new file with mode: 0644]
test/Driver/Inputs/config/x86_64-qqq.cfg [new file with mode: 0644]
test/Driver/Inputs/config/x86_64-qqq2.cfg [new file with mode: 0644]
test/Driver/Inputs/config/x86_64.cfg [new file with mode: 0644]
test/Driver/Inputs/config2/config-4.cfg [new file with mode: 0644]
test/Driver/Inputs/config2/i386.cfg [new file with mode: 0644]
test/Driver/config-file-errs.c [new file with mode: 0644]
test/Driver/config-file.c [new file with mode: 0644]
test/Driver/config-file2.c [new file with mode: 0644]
test/Driver/config-file3.c [new file with mode: 0644]