diff options
| author | Reid Kleckner <reid@kleckner.net> | 2013-06-19 15:09:06 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2013-06-19 15:09:06 +0000 |
| commit | 4cd90dfbf4e6ddfb34c4c14c2e06ac9fca6154d8 (patch) | |
| tree | 9aa11167129c064378c200d764cd95d0c0f32096 /lib/Driver/Tools.cpp | |
| parent | 3c1e4f266a90553459b2b9dfb8e63429eac89995 (diff) | |
| download | clang-4cd90dfbf4e6ddfb34c4c14c2e06ac9fca6154d8.tar.gz clang-4cd90dfbf4e6ddfb34c4c14c2e06ac9fca6154d8.tar.bz2 clang-4cd90dfbf4e6ddfb34c4c14c2e06ac9fca6154d8.tar.xz | |
[Driver] Don't forward source file input args to gcc
gcc's inputs are already added by the InputInfoList passed to
Action::ConstructJob.
Fixes a regression from r183989. This was manifesting when targetting
mingw as an extra input argument to gcc when assembling. It presumably
affects other situations where clang calls gcc.
Prior to r183989, forwardToGCC() was returning false because the INPUT
option defined in OptParser.td had the DriverOption flag set on it.
LLVM's Option library does not set this flag for INPUT.
Reviewers: espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D999
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
| -rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 7f22d6ff09..f88c206840 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -225,7 +225,10 @@ static void addProfileRT(const ToolChain &TC, const ArgList &Args, } static bool forwardToGCC(const Option &O) { - return !O.hasFlag(options::NoForward) && + // Don't forward inputs from the original command line. They are added from + // InputInfoList. + return !O.getKind() == Option::InputClass && + !O.hasFlag(options::NoForward) && !O.hasFlag(options::DriverOption) && !O.hasFlag(options::LinkerInput); } |
