summaryrefslogtreecommitdiff
path: root/share/spack
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-07-04 10:54:13 +0200
committerGitHub <noreply@github.com>2023-07-04 10:54:13 +0200
commit08f23f48024c454428260d75429c8b8753942fe0 (patch)
tree7540b5eb482236d3350ac7b44416a8ff9d4ef3a3 /share/spack
parente9dc6dc96cf4aa912dcff12413c10e51f73631cb (diff)
downloadspack-08f23f48024c454428260d75429c8b8753942fe0.tar.gz
spack-08f23f48024c454428260d75429c8b8753942fe0.tar.bz2
spack-08f23f48024c454428260d75429c8b8753942fe0.tar.xz
spack-08f23f48024c454428260d75429c8b8753942fe0.zip
macos sip: apply on macos only, dont store LD_LIBRARY_PATH (#38687)
Diffstat (limited to 'share/spack')
-rw-r--r--share/spack/csh/spack.csh5
-rwxr-xr-xshare/spack/setup-env.sh4
2 files changed, 3 insertions, 6 deletions
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