File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -956,13 +956,16 @@ case "$mode" in
956956 eval " _frandom_seed_input=\$ {SPACK_${comp} _HAS_FRANDOM_SEED:-}"
957957 if [ -n " $_frandom_seed_input " ]; then
958958 _frandom_seed_input=" "
959- for arg in " $@ " ; do
959+ setsep other_args_list
960+ [ " $sep " != " " ] && IFS=" $sep "
961+ for arg in $other_args_list ; do
960962 case " $arg " in
961963 -frandom-seed=* ) _frandom_seed_input=; break ;;
962964 -* |* .o|* .so|* .dylib|* .a) ;;
963965 * ) _frandom_seed_input=" ${_frandom_seed_input}${arg} " ;;
964966 esac
965967 done
968+ unset IFS
966969 if [ -n " $_frandom_seed_input " ]; then
967970 append full_command_list " -frandom-seed=$_frandom_seed_input "
968971 fi
Original file line number Diff line number Diff line change @@ -1029,10 +1029,15 @@ test_frandom_seed_filters_args() {
10291029 wrapper_environment
10301030 SPACK_CC_HAS_FRANDOM_SEED=1; export SPACK_CC_HAS_FRANDOM_SEED
10311031
1032- # cc mode: -frandom-seed should contain only source files, concatenated
1032+ # cc mode: -frandom-seed should contain only source files, concatenated.
1033+ # Includes space-separated path flags to verify their values do not leak.
10331034 _out=$( dump_args cc ' -c
10341035-O2
10351036-I/some/include
1037+ -isystem
1038+ /some/sys
1039+ -L
1040+ /some/lib
10361041hello.c
10371042world.c
10381043foo.o
You can’t perform that action at this time.
0 commit comments