Skip to content

Windows-LLVMFlang: Support MSVC ABI

Pierrick Bouvier requested to merge pbo-linaro/cmake:flang_windows into master

Enables detection and support for MSVC ABI when using flang-new (officially distributed with Windows on Arm releases of LLVM Project).

ABI variant is detected using target triplet from flang.

Flang-new can't be used as a linker, as it does not support msvc-style parameters (/machine:X, ...). Some Fortran libraries must be linked. Msys2 automatically enables this, so it's not needed for GNU ABI variant.

Tested a hello world example with:

  • flang.exe mingw windows-x64 (from MSYS2)
  • flang.exe mingw windows-arm64 (from MSYS2)
  • flang-new.exe msvc windows-arm64 (from LLVM release)

In more, we could build successfully OpenBLAS for Windows on Arm.

Flang-new is not yet built for windows-x64 releases of LLVM, thus it was not tested, but no further changes are expected.

Fixes: #24840 (closed)

Edited by Pierrick Bouvier

Merge request reports