[flang] Make `flang` translate `-M{fixed|free}` into `-f{fixed|free}-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
This commit is contained in:
parent
49fabd9d76
commit
41f4d47484
|
@ -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.* ]] ||
|
||||
|
|
Loading…
Reference in New Issue