Skip to content
Snippets Groups Projects
Commit 27486275 authored by Kostyantyn Vorobyov's avatar Kostyantyn Vorobyov Committed by Julien Signoles
Browse files

Refactored setting output names in the e-acsl wrapper script

parent 79f6cadb
No related branches found
No related tags found
No related merge requests found
...@@ -347,6 +347,11 @@ EACSL_RTL="$EACSL_SHARE/e_acsl.c \ ...@@ -347,6 +347,11 @@ EACSL_RTL="$EACSL_SHARE/e_acsl.c \
$EACSL_SHARE/memory_model/e_acsl_mmodel.c \ $EACSL_SHARE/memory_model/e_acsl_mmodel.c \
$EACSL_SHARE/memory_model/e_acsl_$OPTION_EACSL_MMODEL.c" $EACSL_SHARE/memory_model/e_acsl_$OPTION_EACSL_MMODEL.c"
# Output file names
OCODE="$OPTION_OCODE" # E-ACSL instrumented source
OEXEC="$OPTION_OEXEC" # Output name of the original executable
EACSL_OEXEC="$OPTION_OEXEC.e-acsl" # Output name of E-ACSL-modified executable
# Instrument # Instrument
if [ -n "$OPTION_INSTRUMENT" ]; then if [ -n "$OPTION_INSTRUMENT" ]; then
($OPTION_ECHO; \ ($OPTION_ECHO; \
...@@ -376,10 +381,10 @@ if test -n "$OPTION_COMPILE" ; then ...@@ -376,10 +381,10 @@ if test -n "$OPTION_COMPILE" ; then
# Compile the original files only if the instrumentation option is given, # Compile the original files only if the instrumentation option is given,
# otherwise the provided sources are assumed to be E-ACSL instrumented files # otherwise the provided sources are assumed to be E-ACSL instrumented files
if [ -n "$OPTION_INSTRUMENT" ]; then if [ -n "$OPTION_INSTRUMENT" ]; then
($OPTION_ECHO; $CC $CPPFLAGS $CFLAGS "$@" -o "$OPTION_OEXEC" $LDFLAGS); ($OPTION_ECHO; $CC $CPPFLAGS $CFLAGS "$@" -o "$OEXEC" $LDFLAGS);
error "fail to compile/link un-instrumented code: $@" $?; error "fail to compile/link un-instrumented code: $@" $?;
else else
OPTION_OCODE="$@" OCODE="$@"
fi fi
# Compile and link E-ACSL-instrumented file # Compile and link E-ACSL-instrumented file
($OPTION_ECHO; ($OPTION_ECHO;
...@@ -390,8 +395,8 @@ if test -n "$OPTION_COMPILE" ; then ...@@ -390,8 +395,8 @@ if test -n "$OPTION_COMPILE" ; then
$OPTION_DEBUG_MACRO \ $OPTION_DEBUG_MACRO \
$OPTION_DEBUG_LOG_MACRO \ $OPTION_DEBUG_LOG_MACRO \
$OPTION_BUILTINS \ $OPTION_BUILTINS \
-o "$OPTION_OEXEC.e-acsl" \ -o "$EACSL_OEXEC" \
"$OPTION_OCODE" \ "$OCODE" \
$LDFLAGS $EACSL_LDFLAGS) $LDFLAGS $EACSL_LDFLAGS)
error "fail to compile/link instrumented code: $@" $?; error "fail to compile/link instrumented code: $@" $?;
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment