From a1c37501ed195d1e03b9871a09bdcf9d9a0559e5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 16 Feb 2009 18:18:43 +0000 Subject: [PATCH] ccc: @ arguments are only treated specially if exists, otherwise gcc just treats as an input. - PR3591 llvm-svn: 64640 --- clang/tools/ccc/ccclib/Arguments.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clang/tools/ccc/ccclib/Arguments.py b/clang/tools/ccc/ccclib/Arguments.py index 2e4c2064ead5..5d20feaae1c6 100644 --- a/clang/tools/ccc/ccclib/Arguments.py +++ b/clang/tools/ccc/ccclib/Arguments.py @@ -1,3 +1,4 @@ +import os ### @@ -1114,8 +1115,13 @@ class OptionParser: # still take them as arguments). pass elif a[0] == '@': - # FIXME: Handle '@' - raise InvalidArgumentsError('@ style argument lists are unsupported') + # @ is only an argument list if it actually + # exists, otherwise it is treated like an input. + if os.path.exists(a[1:]): + # FIXME: Handle '@' + raise InvalidArgumentsError('@ style argument lists are unsupported') + else: + args.append(PositionalArg(i, self.inputOption)) elif a[0] == '-' and a != '-': args.append(self.lookupOptForArg(i, a, it)) else: