aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-20 05:49:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-20 05:49:32 +0000
commit88990f3506c19af89195c60fa02c69fabbaf66ae (patch)
tree9a566a98eafd6219a7bb0b4b1ae6dfa02c9f5fc1
parent00ad0ef8369ee65337ff29c8db3c1841a01102c4 (diff)
ccc: PCH generation doesn't strip the path when generating a derived
filename from the input path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62569 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/ccc/ccclib/Driver.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index 96225664f4..42a789b61a 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -720,7 +720,13 @@ class Driver(object):
output = finalOutput
# Contruct a named destination?
elif atTopLevel or hasSaveTemps:
- output = args.makeSeparateArg(os.path.basename(namedOutput),
+ # As an annoying special case, pch generation
+ # doesn't strip the pathname.
+ if phase.type is Types.PCHType:
+ outputName = namedOutput
+ else:
+ outputName = os.path.basename(namedOutput)
+ output = args.makeSeparateArg(outputName,
self.parser.oOption)
else:
# Output to temp file...