Skip to content

Commit

Permalink
Sanitize more options passed to fparse-llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeekman committed Dec 16, 2024
1 parent eea9850 commit fc34baa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/fparse-llvm.in
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ for arg in "$@"; do
FORTRAN_CONFIG_FILE="${arg#--config_file=}"
shift || true
#echo "args remaining: $*"
# Begin sanitizing options/flags that cause the frontend plugin to throw an error
elif [[ $arg == -- ]]; then
shift
#forward_remaining_args=true
Expand All @@ -114,6 +115,18 @@ for arg in "$@"; do
elif [[ $arg == -g ]]; then
shift || true
#echo "args remaining: $*"
elif [[ $arg == -c ]]; then
shift || true
#echo "args remaining: $*"
elif [[ $arg == -s ]]; then
shift || true
#echo "args remaining: $*"
elif [[ $arg == -shared || $arg == -static ]]; then
shift || true
#echo "args remaining: $*"
elif [[ $arg == -Wl,* ]]; then
shift || true
#echo "args remaining: $*"
elif [[ -n ${arg:-} ]]; then
args+=("${arg}")
shift || true
Expand Down

0 comments on commit fc34baa

Please sign in to comment.