[flang-commits] [flang] [clang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

via flang-commits flang-commits at lists.llvm.org
Fri Jan 5 12:44:04 PST 2024


agozillon wrote:

I am gonna sign off for the weekend as it's quite late here, so I'll reply in a little more detail on Monday and update the PR further. but I'd be happy to add a further flang test, although not too sure what it'd be, so suggestions are welcome.

I tested this with an out of tree build of GPU libc (basically two seperate build directories) and found that -lgpuc wouldn't get the ordering correct to link the library correctly to the fortran runtime, so it seemed for this specific case of an out of tree build of GPU libc the option was the correct way to get it linked in in the correct order. In the case of it finding it in the correct directory i didn't quite manage the perfect build recipe for it (suggestions welcome here as well) and tend to not use the install option myself, but perhaps it would auto detect for Flang as well! However, in the case where it's an separately compiled and installed gpu libc it might be nice to have this option activated as well for Flang to make both methods of linking possible. However, i am a little bit of a driver and build environment/system noob so ill defer to everyone else's better judgement in this case!

https://github.com/llvm/llvm-project/pull/77135


More information about the flang-commits mailing list