[RFC] Names for Flang-RT libraries

Petr Hosek started a discussion on the naming of the flang runtime libraries.

Since it was deeply embedded into the PR, probably not many have seen it. I am opening the RFC for more visibility.

The current library names are (before #122341):

  • libFortranRuntime{.a/.so}
  • libFortranFloat128Math.a (static-only by design)
  • libCufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR}{.a/.so} (e.g libCufRuntime_cuda_12.so)

After #122341, the names will be:

  • libflang_rt{.a/.so}
  • libFortranFloat128Math.a
  • libCufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR}{.a/.so}.

The proposal is to use names:

  • libflang_rt.runtime{.a/.so}
  • libflang_rt.quadmath.a
  • libflang_rt.cuda_${CUDAToolkit_VERSION_MAJOR}{.a/.so}.

The idea is consistency and to resemble more the pattern used by compiler-rt. Without concensus, I will continue with the names from #122341.

1 Like

For my two cents, I like the suffixed names best. Seems clearer and better aligned with our sister projects.

1 Like

I also tend to prefer the names in this proposal so it is more consistent. At least ok for me for the cuda part.

And you would still insist on the libflang_rt.cuda_${CUDAToolkit_VERSION_MAJOR} sources to reside in a subdirectory of “flang_rt”? That is, the following directory layout?

  • lib/runtime and include/flang-rt/runtime for libflang_rt.runtime{.a/.so}
  • lib/quadmath for libflang_rt.quadmath.a
  • lib/runtime/CUDA and include/flang-rt/runtime/CUDA for libflang_rt.cuda_${CUDAToolkit_VERSION_MAJOR}{.a/.so}

Whouldn’t it be more consistent to do the following?

  • lib/runtime and include/flang-rt/runtime for libflang_rt.runtime{.a/.so}
  • lib/quadmath for libflang_rt.quadmath{.a/.so}
  • lib/cuda and include/flang-rt/cuda for libflang_rt.cuda_${CUDAToolkit_VERSION_MAJOR}{.a/.so}

I’m ok to move them into lib/cuda.

1 Like

+1 for consistency with compiler_rt since flang shares a lot of the same driver code. The CUDA libraries should probably go somewhere special, long-term I’d like to use standard paths for the device build with the GPU triple.

Since there were only agreements to the idea, I will make that change.