[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
Wed May 26 09:01:53 PDT 2021


awarzynski created this revision.
Herald added a reviewer: sscalpone.
awarzynski requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, sstefan1.
Herald added a project: LLVM.

Until now, `f18` would:

1. Use Flang to unparse the input files
2. Call an external Fortran compiler to compile the unparsed source files (generated in step 1)

With this patch, `f18` will stop after unparsing the input source files,
i.e. step 1 above. The `flang` bash script will take care of step 2,
i.e. calling an external Fortran compiler driver to compile them. This
way:

- the functionality of `f18` is reduced - it will only drive Flang (as opposed to delegating code-generation to an external tool on top of this)
- we will able to switch between `f18` and `flang-new` for unparsing before an external Fortran compiler is called for code-generation

These changes were discussed in [1] as a requirement for replacing `f18`
with `flang-new`.

[1] https://lists.llvm.org/pipermail/flang-dev/2021-April/000677.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103177

Files:
  flang/tools/f18/f18.cpp
  flang/tools/f18/flang

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103177.347988.patch
Type: text/x-patch
Size: 11860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210526/7ceb299c/attachment.bin>


More information about the llvm-commits mailing list