Will Julia support Flang Fortran?

Just released:

Any comments?

It’s not capable of generating binaries yet. Once it matures, it might be a nice way to get fortran, in particular in a world where we want to also build dependencies as LLVM IR.

2 Likes

I assume you’re referring to https://github.com/llvm/llvm-project/tree/002968a320463237f0ccea754a7482b229e34cf1/flang (release notes for the version in LLVM 11) which is a completely different project, albeit they confusingly share the same name?

2 Likes

Not sure if they are “completely” different projects – the flang-compiler project lists two compilers (or frontends), “flang” based on the old PGI compiler, and “f18” which is a frontend rewrite from scratch. The statement in the f18 repository says that f18 has been migrated into the llvm repo, and in the process got (indeed confusingly) renamed to flang.

Not sure where you’re looking but https://github.com/flang-compiler/flang/wiki says

Currently there are two active projects associated with Fortran and LLVM under the Flang umbrella:

In the short term, the current Flang is a production quality Fortran compiler supporting Fortran 2003, some features from Fortran 2008, and OpenMP.

We believe that starting in 2020, F18 will replace Flang as a complete implementation of Fortran 2018.

[…]

The [https://github.com/flang-compiler/f18](F18 front-end) is being written from scratch using modern C++. It will be closely aligned with LLVM best practices and written in the style of LLVM and clang.

And quoting from https://github.com/llvm/llvm-project/blob/002968a320463237f0ccea754a7482b229e34cf1/flang/README.md

It started off as the f18 project (https://github.com/flang-compiler/f18) with an aim to replace the previous flang project (https://github.com/flang-compiler/flang) and address its various deficiencies.

Same goal, same name, but they look independent efforts.

So which of them could be integrated nicely with Julia, perhaps with a package similar to Cxx.jl ?

The flang that now lives in llvm-project, the one of which you probably saw the announcement yesterday

1 Like