Skip to content

Commit 2982743

Browse files
committed
Fixed the location placement of an unnamed object file, cwd rather than next to source.
1 parent 8b19eb6 commit 2982743

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

driver/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ def getOutputFilename(self):
191191
if self.outputFilename is not None:
192192
return self.outputFilename
193193
elif self.isCompileOnly:
194-
(root, ext) = os.path.splitext(self.inputFiles[0])
194+
#iam: -c but no -o, therefore the obj should end up in the cwd.
195+
(path, base) = os.path.split(self.inputFiles[0])
196+
(root, ext) = os.path.splitext(base)
195197
return '{0}.o'.format(root)
196198
else:
197199
return 'a.out'

0 commit comments

Comments
 (0)