Skip to content

Commit a39388b

Browse files
committed
Log compiler/linker command line at DEBUG level
1 parent 4f56b2d commit a39388b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyop2/compilation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import ctypes
3939
from hashlib import md5
4040
from configuration import configuration
41-
from logger import progress, INFO
41+
from logger import debug, progress, INFO
4242
from exceptions import CompilationError
4343

4444

@@ -125,6 +125,7 @@ def get_so(self, src, extension):
125125
if self._ld is None:
126126
cc = [self._cc] + self._cppargs + \
127127
['-o', tmpname, cname] + self._ldargs
128+
debug('Compilation command: %s', ' '.join(cc))
128129
with file(logfile, "w") as log:
129130
with file(errfile, "w") as err:
130131
log.write("Compilation command:\n")
@@ -150,6 +151,8 @@ def get_so(self, src, extension):
150151
cc = [self._cc] + self._cppargs + \
151152
['-c', '-o', oname, cname]
152153
ld = self._ld.split() + ['-o', tmpname, oname] + self._ldargs
154+
debug('Compilation command: %s', ' '.join(cc))
155+
debug('Link command: %s', ' '.join(ld))
153156
with file(logfile, "w") as log:
154157
with file(errfile, "w") as err:
155158
log.write("Compilation command:\n")

0 commit comments

Comments
 (0)