Modified wrapper to have a different behavior when modeis vcheck
This commit is contained in:
parent
97c3854c40
commit
4316f1cd31
21
lib/spack/env/cc
vendored
21
lib/spack/env/cc
vendored
@ -113,14 +113,22 @@ case "$command" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Finish setting up the mode.
|
||||
# If any of the arguments below is present then the mode is vcheck. In vcheck mode nothing is added in terms of extra search paths or libraries
|
||||
if [ -z "$mode" ]; then
|
||||
mode=ccld
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then
|
||||
mode=vcheck
|
||||
break
|
||||
elif [ "$arg" = -E ]; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Finish setting up the mode.
|
||||
|
||||
if [ -z "$mode" ]; then
|
||||
mode=ccld
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = -E ]; then
|
||||
mode=cpp
|
||||
break
|
||||
elif [ "$arg" = -c ]; then
|
||||
@ -145,6 +153,11 @@ fi
|
||||
# Save original command for debug logging
|
||||
input_command="$@"
|
||||
|
||||
if [ "$mode" == vcheck ] ; then
|
||||
exec "${input_command}"
|
||||
exit
|
||||
fi
|
||||
|
||||
#
|
||||
# Now do real parsing of the command line args, trying hard to keep
|
||||
# non-rpath linker arguments in the proper order w.r.t. other command
|
||||
@ -330,3 +343,5 @@ if [ "$SPACK_DEBUG" = "TRUE" ]; then
|
||||
fi
|
||||
|
||||
exec "${full_command[@]}"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user