]> granicus.if.org Git - clang/commitdiff
ccc: PCH generation doesn't strip the path when generating a derived
authorDaniel Dunbar <daniel@zuster.org>
Tue, 20 Jan 2009 05:49:32 +0000 (05:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 20 Jan 2009 05:49:32 +0000 (05:49 +0000)
filename from the input path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62569 91177308-0d34-0410-b5e6-96231b3b80d8

tools/ccc/ccclib/Driver.py

index 96225664f4248555fc7f806caac75f9c8b9fa86f..42a789b61a298c60fd81ab912de3e91777a2bdf4 100644 (file)
@@ -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...