[PATCH] D117766: [flang] Add support for -acc for compatibility with nvfortran.
Yury Gribov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 25 06:50:40 PST 2022
ygribov updated this revision to Diff 402895.
ygribov added a comment.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Resolve review comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117766/new/
https://reviews.llvm.org/D117766
Files:
flang/tools/f18/flang
Index: flang/tools/f18/flang
===================================================================
--- flang/tools/f18/flang
+++ flang/tools/f18/flang
@@ -180,7 +180,9 @@
# * the Flang driver (either new or the "throwaway" driver)
# * the external Fortran driver that will generate the code
# Most options accepted by Flang will be claimed by it. The only exceptions are
-# `-I` and `-J`.
+# `-I`, `-J`, `-fopenmp` and `-fopenacc` which are passed to both compilers
+# and `-acc` which is replaced with `-fopenacc` for compatibility with
+# external nvfortran compiler.
#
# INPUTS:
# $1 - all compiler options (array, name reference)
@@ -256,6 +258,11 @@
[[ $opt == "-fopenacc" ]]; then
flang_opts+=($opt)
fc_opts+=($opt)
+ elif
+ # Options that have different names in Flang and the external driver.
+ [[ $opt == "-acc" ]]; then
+ flang_opts+=("-fopenacc")
+ fc_opts+=($opt)
else
# All other options are claimed for the external driver.
fc_opts+=($opt)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117766.402895.patch
Type: text/x-patch
Size: 1027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220125/b1ebcff4/attachment-0001.bin>
More information about the llvm-commits
mailing list