Fort, just like Clang, is designed to be easily understandable; it has virtually no learning curve for developers familiar with LLVM or Clang
Fort implements its own compilation pipeline (rather than piggy-backing on Clang) which reduces complexity of the project and allows for faster builds
Fort compiles against LLVM components and produces LLVM IR in memory, which allows catching many of potential IR issues at compile time
Fort follows LLVM release lifecycle from get-go
Fort supports all LLVM targets
Flang emits LLVM IR as text, which is error-prone and often forces to check output only at runtime
Fort uses LLVM diagnostics
Tooling API
Note: it was recently announced that Nvidia is undertaking some form of a rewrite of Flang. Stay tuned for updates to the comparison.
Fort vs GNU Fortran
Pro’s of GNU Fortran vs fort:
Much more complete Fortran support
GNU Fortran (and GCC in general) supports more targets
Pro’s of fort vs GNU Fortran:
Fort ASTs and design are intended to be easily understandable
Fort is designed as an API, which allows it to be used as a foundation for other tools
BSD-style license (can be embedded in other products)
Clear and concise diagnostics
VCPKG error, llvm-config error and lib "unresolved external symbol" many :(((
fort --version
fort version 8.0.1
fort --help
OVERVIEW: Fortran compiler
USAGE: fort
OPTIONS:
-### Print (but do not run) the commands to run for this compilation
-ast-dump Build ASTs and then debug dump them
-ast-print Build ASTs and then pretty-print them
-C Include comments in preprocessed output
-c Compile only -- only run preprocess, compile, and assemble steps
-emit-llvm Use the LLVM representation for assembler and object files
-f77 compile with Fortran77 features
-fdefault-double-8 set the kind of the default double type to 8
-fdefault-integer-8 set the kind of the default integer type to 8
-fdefault-real-8 set the kind of the default real type to 8
-ffixed-form the source files are using fixed form layout
-ffixed-line-length-
maximum allowed line length in fixed form, 0 or 'none' to disable the limit
-ffree-form the source files are using free form layout
-ffree-line-length-
maximum allowed line length in free form, 0 or 'none' to disable the limit
-fsyntax-only Stop after checking syntax
-g Generate source-level debug information
--help-hidden Display help for hidden options
-help Display available options
-I Add directory to include search path
-L Add directory to library search path
--migrate Run the migrator
-o Write output to
-S Emit assembly -- only run preprocess and compilation steps
-triple Specify target triple (e.g. i686-apple-darwin9)
-verify Run the verifier
--version Print version information
-v Show commands to run and use verbose output
Library name: Fort
Library description: Fort project is to create a Fortran front-end for the LLVM compiler
Source repository URL: https://github.com/llvm-fortran/fort
Project homepage (if different from the source repository): http://fort-compiler.org
build>
cmake .. -LA -GNinja -DCMAKE_BUILD_TYPE=Release
Release MSVC x64 Windows Build OK, Debug error
VCPKG error, llvm-config error and lib "unresolved external symbol" many :(((
fort --version
fort --help