Skip to content

Commit

Permalink
[flang] Make flang translate -M{fixed|free} into `-f{fixed|free}-…
Browse files Browse the repository at this point in the history
…form`

We are only adding this in `flang` - the bash wrapper script for the
driver. We don't have any specific plans to support `-M{fixed|free}` in
`flang-new` (i.e. the actual driver).

That feature was requested by one of our users.

Differential Revision: https://reviews.llvm.org/D107081
  • Loading branch information
banach-space committed Aug 9, 2021
1 parent 49fabd9 commit 41f4d47
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions flang/tools/f18/flang
Expand Up @@ -209,11 +209,22 @@ categorise_opts()
[[ $opt == "-Werror" ]]; then
flang_opts+=($opt)
elif
# These options are not supported by `flang-new`. There is also no point
# in forwarding them to the host compiler as the output from
# `-fdebug-unparse` will always be in free form.
# We translate the following into equivalents understood by `flang-new`
[[ $opt == "-Mfixed" ]] || [[ $opt == "-Mfree" ]]; then
:
case $opt in
-Mfixed)
flang_opts+=("-ffixed-form")
;;

-Mfree)
flang_opts+=("-ffree-form")
;;

*)
echo "ERROR: $opt has no equivalent in 'flang-new'"
exit 1
;;
esac
elif
# Options that are needed for both Flang and the external driver.
[[ $opt =~ -I.* ]] ||
Expand Down

0 comments on commit 41f4d47

Please sign in to comment.