[all-commits] [llvm/llvm-project] e77191: [flang][driver] Extend the `flang` bash script to ...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Thu Jul 1 05:56:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e77191c35e334bbdbb72aeaecb44c7b5f6bfd31b
      https://github.com/llvm/llvm-project/commit/e77191c35e334bbdbb72aeaecb44c7b5f6bfd31b
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/tools/f18/CMakeLists.txt
    M flang/tools/f18/f18.cpp
    R flang/tools/f18/flang
    A flang/tools/f18/flang.in

  Log Message:
  -----------
  [flang][driver] Extend the `flang` bash script to act as a driver

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

The updated `flang` bash script needs to specify the output file when
using the `-fdebug-unparse` action. Both `f18` and `flang-new` have been
updated accordingly.

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

Differential Revision: https://reviews.llvm.org/D103177




More information about the All-commits mailing list