diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-05-01 17:13:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-01 17:13:14 -0600 |
commit | 43914a4421fbabdd63a1cb73ef4c48d626498aaa (patch) | |
tree | 1aedfeddf6581d2c62df9bfbc646af95dfe815f0 /numpy/distutils/unixccompiler.py | |
parent | 9c3d2474b391bd110ef7ade1ecc54acfe41e6f2a (diff) | |
parent | 401597bb6262e2f3c26209be3afac235098c55c6 (diff) | |
download | numpy-43914a4421fbabdd63a1cb73ef4c48d626498aaa.tar.gz |
Merge pull request #9038 from juliantaylor/no-rebuild-args
BUG: check compiler flags to determine the need for a rebuild
Diffstat (limited to 'numpy/distutils/unixccompiler.py')
-rw-r--r-- | numpy/distutils/unixccompiler.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py index 307b56ce4..6ed5eec6f 100644 --- a/numpy/distutils/unixccompiler.py +++ b/numpy/distutils/unixccompiler.py @@ -10,6 +10,7 @@ from distutils.errors import DistutilsExecError, CompileError from distutils.unixccompiler import * from numpy.distutils.ccompiler import replace_method from numpy.distutils.compat import get_exception +from numpy.distutils.misc_util import _commandline_dep_string if sys.version_info[0] < 3: from . import log @@ -59,6 +60,10 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts msg = str(get_exception()) raise CompileError(msg) + # add commandline flags to dependency file + with open(obj + '.d', 'a') as f: + f.write(_commandline_dep_string(cc_args, extra_postargs, pp_opts)) + replace_method(UnixCCompiler, '_compile', UnixCCompiler__compile) |