Fortran on Windows on Arm

Fortran on Windows on Arm

(Updated June 2025)

 

This page provides an summary of the availability and status of Fortran compilers for the Windows on Arm (WoA) platform.

The Fortran compiler ecosystem for Windows on Arm has matured significantly. Native compilation is now a reality through the official LLVM Flang compiler, which is actively tested on WoA. For those reliant on the GNU toolchain, gfortran remains a robust option when used within compatibility layers like the Windows Subsystem for Linux (WSL/WSL2).

 

Flang (The official Fortran compiler of LLVM project)

The "New Flang" (previously known as f18 and flang-new) has now matured into the official LLVM Fortran front-end, simply named flang. As of LLVM 20, the -new suffix has been dropped, signaling its readiness for production use. This is the definitive path for modern Fortran development on all LLVM-supported platforms, including Windows on Arm.

Status: Supported and Actively Tested

flang has been included in official LLVM releases for Windows since LLVM 15. It is actively built and validated on Windows on Arm hardware, ensuring that it is a first-class citizen in the LLVM ecosystem.

How to Get It:

Development and Testing @ Linaro:

Linaro is a major contributor to the LLVM Flang project collaborating with industry leaders like Arm, Fujitsu, Qualcomm etc. Linaro engineers contribute directly to the LLVM project, fixing bugs, implementing new Fortran features, and optimizing performance on AArch64. Linaro also runs and maintains a suite of LLVM buildbots that constantly compile and test the latest Flang code, the live status of which is viewable on the public Linaro LLVM Validation Dashboard

For documentation and information about Flang see: https://flang.llvm.org/

 

gFortran (The GNU Fortran compiler)

The GNU Fortran (gfortran) compiler is a stable, mature, and widely-used open-source option in the scientific and HPC communities.

Status: (Available using WSL, Native blocked by WoA GNU Toolchain)

As of now, a native gfortran compiler that can be run directly on the Windows command line (without WSL) is not available for the Arm64 architecture, however it can be used on Windows on Arm through the Windows Subsystem for Linux (WSL)

Future Plans and Current Blockers

The Blocker: The primary obstacle is the lack of an official, fully supported GNU toolchain without which a native gfortran for Windows on Arm cannot be built. Porting the entire GNU toolchain (including GCC, Binutils, and all necessary runtime libraries) to a new platform is a significant on-going effort requiring substantial development and validation effort.

Potential for Future Work: While Linaro currently has no active plans to develop a native gfortran compiler for Windows on Arm, this work could potentially be undertaken in the future if specific funding for such a project becomes available.

 

Classic Flang

Classic Flang is the out-of-tree, open-source version of the PGI/NVIDIA Fortran compiler. While it was an important early effort for enabling Fortran on WoA, the community focus has shifted to the official LLVM Flang.

Status on WoA: Legacy in maintenance mode

  • Development Status: The project is largely in maintenance mode. While Arm has contributed to its development for WoA, the primary path forward for the LLVM community is the new flang.

  • Commercial Use: Notably, some commercial toolchains, such as the Arm® Fortran Compiler for Linux, have been based on Classic Flang, demonstrating its capability on the Arm architecture.

  • Future: It is expected that Classic Flang will be fully superseded by the official LLVM Flang across all platforms.