[PATCH] D117766: [flang] Add support for -acc for compatibility with nvfortran.

Yury Gribov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 02:49:32 PST 2022


ygribov created this revision.
ygribov added reviewers: tskeith, awarzynski, kiranchandramohan.
Herald added a reviewer: sscalpone.
Herald added a project: Flang.
ygribov requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

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,7 @@
 #   * 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` and `-acc`.
 #
 # INPUTS:
 #   $1 - all compiler options (array, name reference)
@@ -256,6 +256,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.401571.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/039b4535/attachment.bin>


More information about the llvm-commits mailing list