diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-16 18:18:43 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-16 18:18:43 +0000 |
commit | 83d67909f9058816d1ab49910708c0ba3c4c8096 (patch) | |
tree | 5aaf76621d6245e768d980a2a73dcc6ddf0ea0db | |
parent | cda9c674998aedeb9319e95a0284f4d266dcef32 (diff) |
ccc: @<filename> arguments are only treated specially if <filename>
exists, otherwise gcc just treats as an input.
- PR3591
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64640 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/ccc/ccclib/Arguments.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/ccc/ccclib/Arguments.py b/tools/ccc/ccclib/Arguments.py index 2e4c2064ea..5d20feaae1 100644 --- a/tools/ccc/ccclib/Arguments.py +++ b/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') + # @<filename> 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: |