Commit Graph

7 Commits

Author SHA1 Message Date
Tom Stellard d970ab63e2 Driver: Accept multiple --config options if filenames are the same
Summary:
We're trying to use the --config options to pass distro specific
options for Fedora via the CFLAGS variable.  However, some projects
end up using the CFLAGS variable multiple times in their command line,
which leads to an error when --config is used.

This patch resolves this issue by allowing more than one --config option
on the command line as long as the file names are the same.

Reviewers: sepavloff, hfinkel

Reviewed By: sepavloff

Subscribers: cfe-commits, llvm-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81424
2020-06-16 12:23:57 -07:00
Martin Storsjo 665c7a4479 [Driver] Don't warn about unused inputs in config files
This avoids warnings about unused linker parameters, just like
other flags are ignored if they're from config files.

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

llvm-svn: 331504
2018-05-04 06:05:58 +00:00
Douglas Yung ba53ef4c46 Fix test to use -S instead of -c so it doesn't unnecessarily run the assembler.
Reviewed by Paul Robinson

llvm-svn: 321776
2018-01-04 00:16:57 +00:00
Sam McCall 296d8327a9 [Driver] Fix unused variables and test-writing-into-workdir after r321621
llvm-svn: 321639
2018-01-02 09:35:10 +00:00
Serge Pavlov 208ac6547c 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

llvm-svn: 321621
2018-01-01 13:27:01 +00:00
Serge Pavlov 55b0747372 Reverted 321587: Enable configuration files in clang
Need to check targets in tests more carefully.

llvm-svn: 321588
2017-12-30 18:38:44 +00:00
Serge Pavlov c92ca91472 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

llvm-svn: 321587
2017-12-30 17:59:26 +00:00