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)