[flang] [llvm] [flang-rt] Implement basic support for I/O from OpenMP GPU Offloading (PR #181039)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 20 08:46:14 PST 2026


jhuber6 wrote:

> I confirm this has to do with `-DFLANG_RT_ENABLE_SHARED=ON`, here is my failing cmake command. If I remove `-DFLANG_RT_ENABLE_SHARED=ON`, the build passes.
> 
> I am making a two stage in tree build with the full LLVM sources on x86-64:
> 
> ```
> cmake   -G Ninja
>   -DCMAKE_C_COMPILER=$GCC_9_3_DIR/bin/gcc 
>   -DCMAKE_CXX_COMPILER=$GCC_9_3_DIR/bin/g++
>   -DLLVM_USE_LINKER=lld
>   -DLLVM_TARGETS_TO_BUILD="host"
>   -DCMAKE_BUILD_TYPE=Release
>   -DLLVM_ENABLE_PROJECTS="clang;mlir;flang;lld"
>   -DLLVM_ENABLE_RUNTIMES="flang-rt;openmp"
>   -DFLANG_RT_ENABLE_SHARED=ON
>   -DRUNTIMES_CMAKE_ARGS="-DCMAKE_C_FLAGS=--gcc-toolchain=$GCC_9_3_DIR/bin/..;
>   -DCMAKE_CXX_FLAGS=--gcc-toolchain=$GCC_9_3_DIR/bin/.."
>   -DCMAKE_INSTALL_PREFIX=$MY_LLVM_INSTALL_DIR
>   -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++"   $MY_LLVM_SRC
> ```

Yep, I forgot to add it to the object library which is only built if both static and shared are enabled. Let me know if https://github.com/llvm/llvm-project/commit/f343cc0eff1cb8b6c0c7aa912c2c8e132b972481 fixed it.

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


More information about the llvm-commits mailing list