[PATCH] D103177: [flang][driver] Extend the `flang` bash script to act as a driver

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 08:11:10 PDT 2021


awarzynski added a comment.

In D103177#2796994 <https://reviews.llvm.org/D103177#2796994>, @klausler wrote:

> What's the timeline for removing the dependency of flang-new on clang?

We don't have a timeline for this, but it will be non-trivial amount of effort. 
We discussed the dependency on Clang in our community calls recently. I was under the impression that we agreed that this dependency is a fair compromise for what we are getting in return. At least in the interim.

In D103177#2797954 <https://reviews.llvm.org/D103177#2797954>, @PeteSteinfeld wrote:

> Actually, I don't see the benefit of removing any functionality from f18.

The new driver is developed to replace `f18`.  In terms of functionality, `flang-new` and `f18` are currently equivalent. However, once we start supporting code-generation, `flang-new` will be able to leverage `clangDriver` for support for different tool-chains and operating systems. In `f18` we would have to implement this from scratch. Also, the new frontend driver is designed to allow for frontend plugins (akin to plugins in Clang). Again, that's something that would take a lot of effort to implement in `f18`. Also, `flang-new` is already more user-friendly than `f18`:

  flang-new -fc1 -random-flag -fdebug-unparse file.f
  error: unknown argument: '-random-flag'

This behavior is consistent across all options (no matter the semantics) and it's something that we get for "free" from `clangDriver`.  In comparison, `f18` happily ignores unknown flags:

  f18 -random-flag -fdebug-unparse file.f

On a different note,

In D103177#2797954 <https://reviews.llvm.org/D103177#2797954>, @PeteSteinfeld wrote:

> This might be a good topic to bring up at the Wednesday f18 meeting.

Sounds like a good idea! Also, as mentioned previously, we don't need to remove any functionality from `f18` in this patch. All changes to f18.cpp have been reverted and we can focus on the bash script instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103177



More information about the llvm-commits mailing list