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
|
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
|
if [ -z "$mode" ]; then
|
||||||
mode=ccld
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then
|
if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then
|
||||||
mode=vcheck
|
mode=vcheck
|
||||||
break
|
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
|
mode=cpp
|
||||||
break
|
break
|
||||||
elif [ "$arg" = -c ]; then
|
elif [ "$arg" = -c ]; then
|
||||||
@ -145,6 +153,11 @@ fi
|
|||||||
# Save original command for debug logging
|
# Save original command for debug logging
|
||||||
input_command="$@"
|
input_command="$@"
|
||||||
|
|
||||||
|
if [ "$mode" == vcheck ] ; then
|
||||||
|
exec "${input_command}"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Now do real parsing of the command line args, trying hard to keep
|
# 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
|
# non-rpath linker arguments in the proper order w.r.t. other command
|
||||||
@ -330,3 +343,5 @@ if [ "$SPACK_DEBUG" = "TRUE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
exec "${full_command[@]}"
|
exec "${full_command[@]}"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user