fix MacOSX build with conda-forge tool-chain
@@ -8,4 +8,16 @@ fi
#export NO_DIST=1
-DAAL4PY_VERSION=$PKG_VERSION TBBROOT=${PREFIX} MPIROOT=${PREFIX} DAALROOT=${PREFIX} ${PYTHON} setup.py install $ARGS
+if [ `uname` == Darwin ]; then
+ # dead_strip_dylibs does not work with DAAL, which is underlinked by design
+ export LDFLAGS="${LDFLAGS//-Wl,-dead_strip_dylibs}"
+ export LDFLAGS_LD="${LDFLAGS_LD//-dead_strip_dylibs}"
+ # some dead_strip_dylibs come from Python's sysconfig. Setting LDSHARED overrides that
+ export LDSHARED="-bundle -undefined dynamic_lookup -Wl,-pie -Wl,-headerpad_max_install_names"
+fi
+
+export DAAL4PY_VERSION=$PKG_VERSION
+export TBBROOT=${PREFIX}
+export MPIROOT=${PREFIX}
+export DAALROOT=${PREFIX}
+${PYTHON} setup.py install $ARGS
