flang-compiler/flang

Differences between this flang and llvm's flang?

meow464 opened this issue ยท 5 comments

Is it just a new/better design? Does this flang have more features?
I'm particularly interested in macOS and iOS support.

This flang was opensource in 2017 by PGI/Nvidia. It is based on their Fortran frontend. This flang supports most of features in Fortran 2003 and some of Fortran 2008. AFAIU, it is the base of the Fortran frontends of the Arm, AMD AOCC and the Huawei Bisheng Compilers. There will be some minor features that will be added but overall the project is in maintenance mode.

We are all in support of the llvm/flang compiler and also contribute to it. The plan is to use llvm/flang once it reaches feature and performance parity with this Flang. Currently in a downstream branch llvm/flang has codegen for Fortran 95. It is being upstreamed to llvm/flang repository. So currently, this flang has more feature support than llvm/flang but this should change in the next one or two years.

For this flang, there is patch that adds support for MacOS. Could you give it a try? #1120

Thanks! I saw that pull and already building it.
Just wanted to make sure I wasn't building the wrong thing.

@kiranchandramohan Just letting you know that I built it successfully on macOS Big Sur. I also needed #1196

@kiranchandramohan
Oh forgot to mention: I need export SDKROOT=$(xcrun --show-sdk-path) and for some reason I need to run it twice. The first time building flang ld can't find libm and libSystem but the second time it can.

Thanks. Closing this issue since I believe the original question was addressed. Please feel free to reopen.