aboutsummaryrefslogtreecommitdiff
path: root/tools/ccc/ccclib/Driver.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ccc/ccclib/Driver.py')
-rw-r--r--tools/ccc/ccclib/Driver.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index cda016153e..43e145b9db 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -802,10 +802,13 @@ class Driver(object):
if phase.type is Types.ImageType:
namedOutput = "a.out"
else:
- inputName = args.getValue(baseInput)
- base,_ = os.path.splitext(inputName)
assert phase.type.tempSuffix is not None
- namedOutput = base + '.' + phase.type.tempSuffix
+ inputName = args.getValue(baseInput)
+ if phase.type.appendSuffix:
+ namedOutput = inputName + '.' + phase.type.tempSuffix
+ else:
+ base,_ = os.path.splitext(inputName)
+ namedOutput = base + '.' + phase.type.tempSuffix
# Output to user requested destination?
if atTopLevel and finalOutput: