From 08f23f48024c454428260d75429c8b8753942fe0 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 4 Jul 2023 10:54:13 +0200 Subject: macos sip: apply on macos only, dont store LD_LIBRARY_PATH (#38687) --- share/spack/csh/spack.csh | 5 +---- share/spack/setup-env.sh | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'share') diff --git a/share/spack/csh/spack.csh b/share/spack/csh/spack.csh index c9f6242a3e..e344d589f8 100644 --- a/share/spack/csh/spack.csh +++ b/share/spack/csh/spack.csh @@ -27,12 +27,9 @@ # avoids the need to come up with a user-friendly naming scheme for # spack module files. ######################################################################## -# Store LD_LIBRARY_PATH variables from spack shell function +# Store DYLD_* variables from spack shell function # This is necessary because MacOS System Integrity Protection clears # variables that affect dyld on process start. -if ( ${?LD_LIBRARY_PATH} ) then - setenv SPACK_LD_LIBRARY_PATH $LD_LIBRARY_PATH -endif if ( ${?DYLD_LIBRARY_PATH} ) then setenv SPACK_DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH endif diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index d3a97d9af6..7d4554359f 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -47,10 +47,10 @@ export _sp_initializing=true _spack_shell_wrapper() { - # Store LD_LIBRARY_PATH variables from spack shell function + # Store DYLD_* variables from spack shell function # This is necessary because MacOS System Integrity Protection clears # variables that affect dyld on process start. - for var in LD_LIBRARY_PATH DYLD_LIBRARY_PATH DYLD_FALLBACK_LIBRARY_PATH; do + for var in DYLD_LIBRARY_PATH DYLD_FALLBACK_LIBRARY_PATH; do eval "if [ -n \"\${${var}-}\" ]; then export SPACK_$var=\${${var}}; fi" done -- cgit v1.2.3-70-g09d2