diff --git a/build/common.mk b/build/common.mk index b717595bbf..5887c52c83 100644 --- a/build/common.mk +++ b/build/common.mk @@ -2025,11 +2025,11 @@ ESMF_PRELOADSCRIPT = $(ESMF_LIBDIR)/preload.sh ifeq ($(ESMF_OS),Darwin) ESMF_ENV_PRELOAD = DYLD_INSERT_LIBRARIES ESMF_ENV_PRELOAD_DELIMIT = ':' -ESMF_SL_PRELOAD_LIBLINKER = $(ESMF_F90LINKER) +ESMF_SL_PRELOAD_LIBLINKER = $(ESMF_F90COMPILER) else ESMF_ENV_PRELOAD = LD_PRELOAD ESMF_ENV_PRELOAD_DELIMIT = ' ' -ESMF_SL_PRELOAD_LIBLINKER = $(ESMF_SL_LIBLINKER) +ESMF_SL_PRELOAD_LIBLINKER = $(ESMF_CXXCOMPILER) endif # MPI implementations do not pick up LD_PRELOAD