]> granicus.if.org Git - clang/commit
Enable configuration files in clang
authorSerge Pavlov <sepavloff@gmail.com>
Sat, 30 Dec 2017 17:59:26 +0000 (17:59 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Sat, 30 Dec 2017 17:59:26 +0000 (17:59 +0000)
commit67245e0d36c6dd3d02f8434dffa29de19b97e620
treefebb8c2a24cf0263aee14706972a4b0d7a600d56
parent0682d12e455d31b91fa41bc562ae3fa53388a820
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@321587 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]