macos sip: apply on macos only, dont store LD_LIBRARY_PATH (#38687)
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user