CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
64 lines
2.4 KiB
ReStructuredText
64 lines
2.4 KiB
ReStructuredText
flang - the Flang Fortran compiler
|
|
==================================
|
|
|
|
SYNOPSIS
|
|
--------
|
|
|
|
:program:`flang` [*options*] *filename ...*
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
|
|
:program:`flang` is a Fortran compiler which supports all of the Fortran 95 and
|
|
many newer language features. Flang supports OpenMP and has some support for
|
|
OpenACC and CUDA. It encompasses preprocessing, parsing, optimization, code
|
|
generation, assembly, and linking. Depending on the options passed in, Flang
|
|
will perform only some, or all, of these actions. While Flang is highly
|
|
integrated, it is important to understand the stages of compilation in order to
|
|
understand how to invoke it. These stages are:
|
|
|
|
Driver
|
|
The flang executable is actually a small driver that orchestrates the
|
|
execution of other tools such as the compiler, assembler and linker.
|
|
Typically you do not need to interact with the driver, but you
|
|
transparently use it to run the other tools.
|
|
|
|
Preprocessing
|
|
This stage performs tokenization of the input source file, macro expansion,
|
|
#include expansion and handles other preprocessor directives.
|
|
|
|
Parsing and Semantic Analysis
|
|
This stage parses the input file, translating preprocessor tokens into a
|
|
parse tree. Once in the form of a parse tree, it applies semantic
|
|
analysis to compute types for expressions and determine whether
|
|
the code is well formed. Parse errors and most compiler warnings
|
|
are generated by this stage.
|
|
|
|
Code Generation and Optimization
|
|
This stage translates the parse tree into intermediate code (known as
|
|
"LLVM IR") and, ultimately, machine code. It also optimizes this
|
|
intermediate code and handles target-specific code generation. The output
|
|
of this stage is typically a ".s" file, referred to as an "assembly" file.
|
|
|
|
Flang also supports the use of an integrated assembler, in which the code
|
|
generator produces object files directly. This avoids the overhead of
|
|
generating the ".s" file and calling the target assembler explicitly.
|
|
|
|
Assembler
|
|
This stage runs the target assembler to translate the output of the
|
|
compiler into a target object file. The output of this stage is typically
|
|
a ".o" file, referred to as an "object" file.
|
|
|
|
Linker
|
|
This stage runs the target linker to merge multiple object files into an
|
|
executable or dynamic library. The output of this stage is typically
|
|
an "a.out", ".dylib" or ".so" file.
|
|
|
|
OPTIONS
|
|
-------
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
FlangCommandLineOptions
|