Skip to content

Commit

Permalink
Avoid a loop in the compiler wrapper and use instead an array expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
alalazo committed Feb 15, 2019
1 parent d4b4ebf commit f428656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/spack/env/cc
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,10 @@ case "$mode" in
ld|ccld)
# Set extra RPATHs
IFS=':' read -ra extra_rpaths <<< "$SPACK_COMPILER_EXTRA_RPATHS"
for extra_rpath in "${extra_rpaths[@]}"; do
$add_rpaths && rpaths+=("$extra_rpath")
libdirs+=("$extra_rpath")
done
libdirs+=("${extra_rpaths[@]}")
if [[ "$add_rpaths" != "false" ]] ; then
rpaths+=("${extra_rpaths[@]}")
fi

# Add SPACK_LDLIBS to args
for lib in "${SPACK_LDLIBS[@]}"; do
Expand Down

0 comments on commit f428656

Please sign in to comment.