[clang] [llvm] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use static library (PR #126143)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 19 06:09:48 PDT 2025
jhuber6 wrote:
> This change broke building with GCC set as the C++ compiler:
>
> ```
> FAILED: libomptarget-nvptx.bc
> : && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs --target=nvptx64-nvidia-cuda -r -nostdlib -flto -Wl,--lto-emit-llvm -Wl,--dependency-file=DeviceRTL/CMakeFiles/libomptarget-nvptx.dir/link.d DeviceRTL/Allocator.cpp-nvptx.o DeviceRTL/Configuration.cpp-nvptx.o DeviceRTL/Debug.cpp-nvptx.o DeviceRTL/Kernel.cpp-nvptx.o DeviceRTL/LibC.cpp-nvptx.o DeviceRTL/Mapping.cpp-nvptx.o DeviceRTL/Misc.cpp-nvptx.o DeviceRTL/Parallelism.cpp-nvptx.o DeviceRTL/Profiling.cpp-nvptx.o DeviceRTL/Reduction.cpp-nvptx.o DeviceRTL/State.cpp-nvptx.o DeviceRTL/Synchronization.cpp-nvptx.o DeviceRTL/Tasking.cpp-nvptx.o DeviceRTL/DeviceUtils.cpp-nvptx.o DeviceRTL/Workshare.cpp-nvptx.o -o libomptarget-nvptx.bc && :
> x86_64-pc-linux-gnu-g++: error: unrecognized command-line option ‘--target=nvptx64-nvidia-cuda’
> FAILED: libomptarget-amdgpu.bc
> : && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs --target=amdgcn-amd-amdhsa -r -nostdlib -flto -Wl,--lto-emit-llvm -Wl,--dependency-file=DeviceRTL/CMakeFiles/libomptarget-amdgpu.dir/link.d DeviceRTL/Allocator.cpp-amdgpu.o DeviceRTL/Configuration.cpp-amdgpu.o DeviceRTL/Debug.cpp-amdgpu.o DeviceRTL/Kernel.cpp-amdgpu.o DeviceRTL/LibC.cpp-amdgpu.o DeviceRTL/Mapping.cpp-amdgpu.o DeviceRTL/Misc.cpp-amdgpu.o DeviceRTL/Parallelism.cpp-amdgpu.o DeviceRTL/Profiling.cpp-amdgpu.o DeviceRTL/Reduction.cpp-amdgpu.o DeviceRTL/State.cpp-amdgpu.o DeviceRTL/Synchronization.cpp-amdgpu.o DeviceRTL/Tasking.cpp-amdgpu.o DeviceRTL/DeviceUtils.cpp-amdgpu.o DeviceRTL/Workshare.cpp-amdgpu.o -o libomptarget-amdgpu.bc && :
> x86_64-pc-linux-gnu-g++: error: unrecognized command-line option ‘--target=amdgcn-amd-amdhsa’
> ```
>
> Previuosly the code used clang explicitly but now it just seems to make wrong assumptions about `CMAKE_CXX_COMPILER`.
Is this through `-DLLVM_ENABLE_PROJECTS=openmp;offload`? That's going to be a fatal error in the LLVM21 release https://github.com/llvm/llvm-project/ /136314. However, probably should've made that louder before landing this.
https://github.com/llvm/llvm-project/pull/126143
More information about the llvm-commits
mailing list