diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2017-11-30 15:29:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-30 15:29:11 -0700 |
| commit | 5e5e031cf69380ce105e322d38052bc0689a65b4 (patch) | |
| tree | e5bcdfe939eac262a2c5d72e8696721a7fc33b1a /numpy | |
| parent | 426b66b033517b898f3a3a370da3a4bbcdba55f9 (diff) | |
| parent | a81b9abe8f2f44c74e0728c86196882e61bf534a (diff) | |
| download | numpy-5e5e031cf69380ce105e322d38052bc0689a65b4.tar.gz | |
Merge pull request #10116 from schnaitterm/master
BLD: [ipo] compilation error with intel compiler
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/setup_common.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index 97608d18a..bd093c5c8 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -216,6 +216,21 @@ def check_long_double_representation(cmd): except (AttributeError, ValueError): pass + # Disable multi-file interprocedural optimization in the Intel compiler on Linux + # which generates intermediary object files and prevents checking the + # float representation. + elif (sys.platform != "win32" + and cmd.compiler.compiler_type.startswith('intel') + and '-ipo' in cmd.compiler.cc_exe): + newcompiler = cmd.compiler.cc_exe.replace(' -ipo', '') + cmd.compiler.set_executables( + compiler=newcompiler, + compiler_so=newcompiler, + compiler_cxx=newcompiler, + linker_exe=newcompiler, + linker_so=newcompiler + ' -shared' + ) + # We need to use _compile because we need the object filename src, obj = cmd._compile(body, None, None, 'c') try: |
