ccc: Stop patching output file name when using transparent PTH support.

<rdar://problem/6515236> [ccc] generate expected output files when used with PCH


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64419 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2009-02-13 00:49:01 +00:00
Родитель d7038e18ef
Коммит 3d2b79020a
1 изменённых файлов: 5 добавлений и 14 удалений

Просмотреть файл

@ -176,8 +176,6 @@ class Clang_CompileTool(Tool):
output, outputType, arglist, linkingOutput): output, outputType, arglist, linkingOutput):
cmd_args = [] cmd_args = []
patchOutputNameForPTH = False
if isinstance(phase.phase, Phases.AnalyzePhase): if isinstance(phase.phase, Phases.AnalyzePhase):
assert outputType is Types.PlistType assert outputType is Types.PlistType
cmd_args.append('-analyze') cmd_args.append('-analyze')
@ -194,9 +192,9 @@ class Clang_CompileTool(Tool):
outputType is inputs[0].type.preprocess): outputType is inputs[0].type.preprocess):
cmd_args.append('-E') cmd_args.append('-E')
elif outputType is Types.PCHType: elif outputType is Types.PCHType:
# No special option needed, driven by -x. However, we # No special option needed, driven by -x.
# patch the output name to try and not conflict with gcc. #
patchOutputNameForPTH = True # FIXME: Don't drive this by -x, that is gross.
# FIXME: This is a total hack. Copy the input header file # FIXME: This is a total hack. Copy the input header file
# to the output, so that it can be -include'd by clang. # to the output, so that it can be -include'd by clang.
@ -337,15 +335,8 @@ class Clang_CompileTool(Tool):
if isinstance(output, Jobs.PipedJob): if isinstance(output, Jobs.PipedJob):
cmd_args.extend(['-o', '-']) cmd_args.extend(['-o', '-'])
else: elif output:
if patchOutputNameForPTH: cmd_args.extend(arglist.render(output))
base,suffix = os.path.splitext(arglist.getValue(output))
if suffix == '.gch':
suffix = '.pth'
cmd_args.append('-o')
cmd_args.append(base + suffix)
elif output:
cmd_args.extend(arglist.render(output))
for input in inputs: for input in inputs:
cmd_args.append('-x') cmd_args.append('-x')