diff --git a/etc/environment.sh b/etc/environment.sh index 6ea7263e4..23cf6b9bd 100755 --- a/etc/environment.sh +++ b/etc/environment.sh @@ -204,7 +204,7 @@ if [[ ${OS_NAME} == "Darwin" ]]; then if [[ ${BUILD_TOOL_VER} -ge 15 ]]; then # Add flag for classic linker only if it has not already been added if [[ -z $(echo $LDFLAGS | /usr/bin/grep "\-Wl,\-ld_classic") ]]; then - export LDFLAGS="${LDFLAGS} -Wl,-ld_classic" + export LDFLAGS="${LDFLAGS} -Wl,-ld_classic -Wl,-commons,use_dylibs" fi else export LDFLAGS="${LDFLAGS}" # At least set LDFLAGS to null string if it is not already set (used in installation of ISSM and some external packages). Can remove this when issues with new Xcode linker have settled.