The source is at http://github.com/flang-compiler/.
There are 4 repositories:
llvm: The version of LLVM that we use to build Flang.
flang-driver: A Clang fork used as the basis of the Flang driver.
openmp: The version of OpenMP we use to buidl flang.
flang: The Flang compiler itself.
This binary release was created from the flang_20190329 tag of Flang.
It contains the binaries and libraries suitable for running
Flang (LLVM 7.0) on x86_64 and OpenPOWER distributions.
Community Resources
We have mailing lists for announcements and developers.
Here's the link with the sign-up information:
http://lists.flang-compiler.org/mailman/listinfo
We have a flang-compiler channel on Slack. Slack is invitation
only but anyone can join. Here's the link:
To install the binary release, untar the .tgz file in
a location suitable for you. Add the bin directory to
your PATH and lib directory to your LD_LIBRARY_PATH,
after which you should be able to execute Flang.
Building Your First Program
To test your installation, create a simple "hello world" program, like the
following:
program hello
print *, 'hello world'
end
Next, compile the program in the following manner. We will assume the
program is in a file called hello.f90
$ flang hello.f90
If the build succeeds, then you can execute the program:
$ ./a.out
Flang Binary Release Minimum Requirements
Below are the minimum requirements to compile and run Flang:
Host Processor:
64-bit OpenPOWER
64-bit x86 (including AMD64 and Intel 64)
OpenPOWER Linux:
Ubuntu 14.04, 16.04
Red Hat Enterprise Linux 7.3, 7.4 for IBM Power (POWER8)
Red Hat Enterprise Linux 7.4 for IBM Power LE (POWER9)
x86-64 Linux:
CentOS 5 or newer
OpenSuSE 11 or newer including OpenSuSE Leap 42.2
SUSE Linux Enterprise Server (SLES) 11 or newer
Red Hat Enterprise Linux 5 or newer
Fedora Core 6 or newer
Ubuntu 12.04 or newer
Flang Binary Release File List
Below is a list of files in the tar archives for x86-64 and OpenPOWER:
The Flang compiler supports all clang 7.0 compiler options
as well as the following Flang-specific compiler options:
| Option | Description |
| :----- | :---------- |
| -byteswapio | Swap byte-order for unformatted input/output
| -cpp | Preprocess Fortran files
| -fbackslash | Treat backslash as C-style escape character
| -fdefault-integer-8 | Treat INTEGER and LOGICAL as INTEGER8 and LOGICAL8
| -fdefault-real-8 | Treat REAL as REAL*8
| -ffixed-form | Enable fixed-form format for Fortran
| -ffixed-line-length- | Set line length in fixed-form format Fortran, current supporting only 72 and 132 characters
| -ffree-form | Enable free-form format for Fortran
| -fno-backslash | Treat backslash like any other character in character strings
| -fno-fixed-form | Disable fixed-form format for Fortran
| -fno-fortran-main | Don't link in Fortran main
| -fno-free-form | Disable free-form format for Fortran
| -Mallocatable= | Select semantics for assignments to allocatables (F03 or F95)
| -Minfo | Diagnostic information about all successful optimizations
| -Minform= | Set error level of messages to display
| -Minfo= | Diagnostic information about successful optimizations
| -Mneginfo | Diagnostic information about all missed optimizations
| -Mneginfo= | Diagnostic information about missed optimizations
| -nocpp | Don't preprocess Fortran files
| -no-flang-libs | Do not link against Flang libraries
| -static-flang-libs | Link using static Flang libraries
Known Issues
See the GitHub issues list for the known issues with Flang:
http://github.com/flang-compiler/flang/issues
The following "check-flang" tests fail on OpenPOWER: