[PATCH] D107081: [flang] Make `flang` translate `-M{fixed|free}` into `-f{fixed|free}-form`
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 29 08:04:21 PDT 2021
awarzynski created this revision.
Herald added a reviewer: sscalpone.
awarzynski requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
That was requested by a user. Note that we don't have plans to support
`-M{fixed|free}` in `flang-new` (i.e. the actual driver).
I also took the liberty of fixing a typo introduced in
https://reviews.llvm.org/D106871 (extra `||`).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107081
Files:
flang/tools/f18/flang.in
Index: flang/tools/f18/flang.in
===================================================================
--- flang/tools/f18/flang.in
+++ flang/tools/f18/flang.in
@@ -209,18 +209,28 @@
[[ $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.* ]] ||
[[ $opt =~ -J.* ]] ||
[[ $opt == "-fopenmp" ]] ||
- [[ $opt == "-fopenacc" ]] ||
- ; then
+ [[ $opt == "-fopenacc" ]]; then
flang_opts+=($opt)
fc_opts+=($opt)
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107081.362783.patch
Type: text/x-patch
Size: 1227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210729/6d8a6197/attachment.bin>
More information about the llvm-commits
mailing list