[PATCH] D96464: [flang] Don't perform macro replacement unless *.F, *.F90, &c.

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 11:05:16 PST 2021


klausler added a comment.

In D96464#2557497 <https://reviews.llvm.org/D96464#2557497>, @awarzynski wrote:

> Thank you for clarifying, this helps a lot!
>
> As there is no intention for `f18 -nocpp` (or `flang-new -nocpp`) to match the behavior of `gfortran -nocpp`, could we use different spellings? Also, I doubt that we would be able to re-use `-cpp/-nocpp` in `flang-new` for something other than enabling/disabling the preprocessor (these options are already present in Options.td <https://github.com/llvm/llvm-project/blob/0feff71eabd39fc93f3d9ec30ed16e26da6cf883/clang/include/clang/Driver/Options.td#L4140-L4141>).
>
> I'm guessing that want something with semantics similar to `-ffree-form/-ffixed-form`. Naming is hard, but let me try suggesting something:
>
> - `-fadd-pp-predefs/-fno-pp-predefs` (add preprocessor predefinitions)
> - `-fno-macro-predefs/-fmacro-predefs` (add macro predefinitions)
> - `-fno-std-macro-predefs/-fstd-macro-predefs` (add standard macro predefinitions)
>
> Would any of these make sense to you?

I would not enjoy explaining to a user why they have to modify their decades-old makefiles to build their existing applications with your new driver; I advise that you avoid gratuitous incompatibility.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96464/new/

https://reviews.llvm.org/D96464



More information about the llvm-commits mailing list