diff options
author | Chris Hogan <christopher.hogan@intel.com> | 2015-10-15 14:09:24 -0500 |
---|---|---|
committer | Chris Hogan <christopher.hogan@intel.com> | 2015-10-15 14:09:24 -0500 |
commit | 5c0cd1b23e1a6797cf3af04c5c3cfb41312f1750 (patch) | |
tree | 8cfd51eff964d976b52f25ebd3a4402cfb943cc9 | |
parent | 7ca2cea5656fd88c39a547c3db7d91e363952893 (diff) | |
download | numpy-5c0cd1b23e1a6797cf3af04c5c3cfb41312f1750.tar.gz |
BUG: Fix Intel compiler flags for OS X build
-rw-r--r-- | numpy/distutils/intelccompiler.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/numpy/distutils/intelccompiler.py b/numpy/distutils/intelccompiler.py index 1f49dc4b4..20c6d2ba4 100644 --- a/numpy/distutils/intelccompiler.py +++ b/numpy/distutils/intelccompiler.py @@ -20,12 +20,17 @@ class IntelCCompiler(UnixCCompiler): self.cc_exe = ('icc -fPIC -fp-model strict -O3 ' '-fomit-frame-pointer -openmp') compiler = self.cc_exe + if platform.system() == 'Darwin': + shared_flag = '-Wl,-undefined,dynamic_lookup' + else: + shared_flag = '-shared' self.set_executables(compiler=compiler, compiler_so=compiler, compiler_cxx=compiler, archiver='xiar' + ' cru', linker_exe=compiler + ' -shared-intel', - linker_so=compiler + ' -shared -shared-intel') + linker_so=compiler + ' ' + shared_flag + + ' -shared-intel') class IntelItaniumCCompiler(IntelCCompiler): @@ -51,12 +56,17 @@ class IntelEM64TCCompiler(UnixCCompiler): self.cc_exe = ('icc -m64 -fPIC -fp-model strict -O3 ' '-fomit-frame-pointer -openmp -xSSE4.2') compiler = self.cc_exe + if platform.system() == 'Darwin': + shared_flag = '-Wl,-undefined,dynamic_lookup' + else: + shared_flag = '-shared' self.set_executables(compiler=compiler, compiler_so=compiler, compiler_cxx=compiler, archiver='xiar' + ' cru', linker_exe=compiler + ' -shared-intel', - linker_so=compiler + ' -shared -shared-intel') + linker_so=compiler + ' ' + shared_flag + + ' -shared-intel') if platform.system() == 'Windows': |