[PATCH] D104229: [flang][docs] Add documentation for the new Flang driver

Richard Barton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 08:51:43 PDT 2021


richard.barton.arm accepted this revision.
richard.barton.arm added a comment.

Happy with the changes made since my comments. 
Thanks Andrzej for the great documentation.



================
Comment at: flang/docs/FlangDriver.md:69
+```
+flang -ccc-print-phases -c file.f
+         +- 0: input, "file.f", f95-cpp-input
----------------
awarzynski wrote:
> richard.barton.arm wrote:
> > I thought this was wrong when I first saw it, but I can reproduce. What's flang-new doing here then? I thought there was no support for these phases in flang yet?
> Sorry, I should've clarified.
> 
> `-ccc-print-phases` prints what phases `clangDriver` _would_ generate. That's not something `flang-new` is in control of. However, when you try to run it without `-ccc-print-phases`, it fails during the 2nd phase above:
> ```
> error: code-generation is not available yet
> ```
> 
> Making `-ccc-print-phases` a bit more clever would be nice, but it would have to happen in Clang. In the meantime, I will add a clarification here.
That's a nicer error message than I expected too.


================
Comment at: flang/docs/FlangDriver.md:22
+preprocessing, frontend code-generation, middlend/backend code-optimisation and
+lowering, linking). For frontend specific tasks, the compiler driver creates a
+frontend job and delegates it to `flang -fc1`, the frontend driver.
----------------
awarzynski wrote:
> richard.barton.arm wrote:
> > Is that the right word choice? I think it's for Fortran compilation jobs isn't it?
> > 
> > I wonder if "toolchain driver" == flang and "compiler driver" -> flang -fc1 might work better?
> I find this a bit tricky - I've never seen Clang being referred to as a "toolchain driver". LLDB is tool that belongs to the LLVM toolchain, but it's not driven by Clang. On the other hand, Clang does drive the compiler (i.e. Clang & LLVM) **and** the linker, so it's more than just a compiler driver.
ok - let's leave it there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104229



More information about the llvm-commits mailing list