[flang-commits] [flang] c2e3e91 - [flang][driver] Remove references to the `flang` bash script

Andrzej Warzynski via flang-commits flang-commits at lists.llvm.org
Mon Jun 6 06:06:12 PDT 2022


Author: Andrzej Warzynski
Date: 2022-06-06T13:05:18Z
New Revision: c2e3e91ddec002ac2514708867153e5f6b03dc48

URL: https://github.com/llvm/llvm-project/commit/c2e3e91ddec002ac2514708867153e5f6b03dc48
DIFF: https://github.com/llvm/llvm-project/commit/c2e3e91ddec002ac2514708867153e5f6b03dc48.diff

LOG: [flang][driver] Remove references to the `flang` bash script

This is a follow-up of https://reviews.llvm.org/D125832
(see also https://reviews.llvm.org/D125788 for more context). It simply
removes any remaining references to the `flang` bash script. Note that
that `flang-to-external-fc` remains intact.

This felt worthwhile mentioning in the release notes, which have not
been updated since LLVM 12 (we are approaching LLVM 15 now). I took the
liberty of removing all of the out-dated content and added a note about
the renaming.

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

Added: 
    

Modified: 
    flang/docs/FlangDriver.md
    flang/docs/ReleaseNotes.md
    flang/tools/f18/CMakeLists.txt
    flang/tools/f18/flang-to-external-fc

Removed: 
    


################################################################################
diff  --git a/flang/docs/FlangDriver.md b/flang/docs/FlangDriver.md
index 8d6c73fef794e..af1fddc8f750a 100644
--- a/flang/docs/FlangDriver.md
+++ b/flang/docs/FlangDriver.md
@@ -18,9 +18,8 @@ There are two main drivers in Flang:
 * the frontend driver, `flang-new -fc1`
 
 > **_NOTE:_** The diagrams in this document refer to `flang` as opposed to
-> `flang-new`. This is because the diagrams reflect the final design that we
-> are still working towards. See the note on [the flang script](https://github.com/llvm/llvm-project/blob/main/flang/docs/FlangDriver.md#the-flang-script)
-> below for more context.
+> `flang-new`. Eventually, `flang-new` will be renamed as `flang` and the
+> diagrams reflect the final design that we are still working towards.
 
 The **compiler driver** will allow you to control all compilation phases (e.g.
 preprocessing, semantic checks, code-generation, code-optimisation, lowering
@@ -206,32 +205,25 @@ is `ParseSyntaxOnlyAction`, which corresponds to `-fsyntax-only`. In other
 words, `flang-new -fc1 <input-file>` is equivalent to `flang-new -fc1 -fsyntax-only
 <input-file>`.
 
-## The `flang` script
-The `flang` wrapper script for `flang-new` was introduced as a development tool
-and to facilitate testing. While code-generation is not available in Flang, you
-can use it as a drop-in replacement for other Fortran compilers in your build
-scripts.
-
-The `flang` wrapper script will:
+## The `flang-to-external-fc` script
+The `flang-to-external-fc` wrapper script for `flang-new` was introduced as a
+development tool and to facilitate testing. The `flang-to-external-fc` wrapper
+script will:
 * use `flang-new` to unparse the input source file (i.e. it will run `flang-new
   -fc1 -fdebug-unparse <input-file>`), and then
 * call a host Fortran compiler, e.g. `gfortran`, to compile the unparsed file.
 
-Here's a basic breakdown of what happens inside `flang` when you run `flang
-file.f90`:
+Here's a basic breakdown of what happens inside `flang-to-external-fc` when you
+run `flang-to-external-fc file.f90`:
 ```bash
 flang-new -fc1 -fdebug-unparse file.f90 -o file-unparsed.f90
 gfortran file-unparsed.f90
 ```
 This is a simplified version for illustration purposes only. In practice,
-`flang` adds a few more frontend options and it also supports various other use
-cases (e.g. compiling C files, linking existing object files). `gfortran` is
-the default host compiler used by `flang`. You can change it by setting the
-`FLANG_FC` environment variable.
-
-Our intention is to replace `flang` with `flang-new`. Please consider `flang`
-as a temporary substitute for Flang's compiler driver while the actual driver
-is in development.
+`flang-to-external-fc` adds a few more frontend options and it also supports
+various other use cases (e.g. compiling C files, linking existing object
+files). `gfortran` is the default host compiler used by `flang-to-external-fc`.
+You can change it by setting the `FLANG_FC` environment variable.
 
 ## Adding new Compiler Options
 Adding a new compiler option in Flang consists of two steps:

diff  --git a/flang/docs/ReleaseNotes.md b/flang/docs/ReleaseNotes.md
index b4b00ee65ffb2..7696f423b8c1d 100644
--- a/flang/docs/ReleaseNotes.md
+++ b/flang/docs/ReleaseNotes.md
@@ -1,15 +1,15 @@
-# Flang 12.0.0 (In-Progress) Release Notes
+# Flang 15.0.0 (In-Progress) Release Notes
 
 > **warning**
 >
-> These are in-progress notes for the upcoming LLVM 12.0.0 release.
+> These are in-progress notes for the upcoming LLVM 15.0.0 release.
 > Release notes for previous releases can be found on [the Download
 > Page](https://releases.llvm.org/download.html).
 
 ## Introduction
 
 This document contains the release notes for the Flang Fortran frontend,
-part of the LLVM Compiler Infrastructure, release 12.0.0. Here we
+part of the LLVM Compiler Infrastructure, release 15.0.0. Here we
 describe the status of Flang in some detail, including major
 improvements from the previous release and new feature work. For the
 general LLVM release notes, see [the LLVM
@@ -22,60 +22,23 @@ document applies to the *next* release, not the current one. To see the
 release notes for a specific release, please see the [releases
 page](https://llvm.org/releases/).
 
-## Known Issues
+## Major New Features
 
-These are issues that couldn't be fixed before the release. See the bug
-reports for the latest status.
+## Bug Fixes
 
- *   ...
+## Non-comprehensive list of changes in this release
+* The bash wrapper script, `flang`, is renamed as `flang-to-external-fc`.
 
-## Introducing Flang
+## New Compiler Flags
 
-Flang is LLVM's Fortran front end and is new for the LLVM 11 release.
+## Windows Support
 
-Flang is still a work in progress for this release and is included for
-experimentation and feedback.
+## Fortran Language Changes in Flang
 
-Flang is able to parse a comprehensive subset of the Fortran language
-and check it for correctness. Flang is not yet able to generate LLVM IR
-for the source code and thus is unable to compile a running binary.
+## Build System Changes
 
-Flang is able to unparse the input source code into a canonical form and
-emit it to allow testing. Flang can also invoke an external Fortran
-compiler on this canonical input.
+## New Issues Found
 
-Flang's parser has comprehensive support for:
- * Fortran 2018
- * OpenMP 4.5
- * OpenACC 3.0
-
-Interested users are invited to try to compile their Fortran codes with
-flang in and report any issues in parsing or semantic checking in
-[bugzilla](https://bugs.llvm.org/enter_bug.cgi?product=flang).
-
-### Major missing features
-
- * Flang is not supported on Windows platforms.
-
-## Using Flang
-
-Usage: `flang hello.f90 -o hello.bin`
-
-By default, Flang will parse the Fortran file `hello.f90` then unparse it to a
-canonical Fortran source file. Flang will then invoke an external
-Fortran compiler to compile this source file and link it, placing the
-resulting executable in `hello.bin`.
-
-To specify the external Fortran compiler, set the `F18_FC` environment
-variable to the name of the compiler binary and ensure that it is on your
-`PATH`. The default value for `F18_FC` is `gfortran`.
-
-When invoked with no source input, Flang will wait for input on stdin.
-When invoked in this way, Flang performs the same actions as if
-called with `-fdebug-measure-parse-tree -funparse` and does not invoke
-`F18_FC`.
-
-For a full list of options that Flang supports, run `flang --help`.
 
 ## Additional Information
 

diff  --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index 85d0ad89dd037..5fb37794d28e4 100644
--- a/flang/tools/f18/CMakeLists.txt
+++ b/flang/tools/f18/CMakeLists.txt
@@ -56,9 +56,6 @@ if (NOT WIN32)
     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin)
   add_custom_target(flang-to-external-fc ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc)
   install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc DESTINATION "${CMAKE_INSTALL_BINDIR}")
-  add_custom_target(flang-slink ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc COMMAND ${CMAKE_COMMAND} -E create_symlink
-    ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin/flang)
-  install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION "${CMAKE_INSTALL_BINDIR}")
 endif()
 
 # TODO Move this to a more suitable location

diff  --git a/flang/tools/f18/flang-to-external-fc b/flang/tools/f18/flang-to-external-fc
index fc3a3a01556ee..24ceda3b7812c 100755
--- a/flang/tools/f18/flang-to-external-fc
+++ b/flang/tools/f18/flang-to-external-fc
@@ -1,5 +1,5 @@
 #! /usr/bin/env bash
-#===-- tools/f18/flang.sh -----------------------------------------*- sh -*-===#
+#===-- tools/f18/flang-to-external-fc.sh --------------------------*- sh -*-===#
 #
 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 # See https://llvm.org/LICENSE.txt for license information.


        


More information about the flang-commits mailing list