[Openmp-commits] [openmp] b64482e - [libomptarget] Fix CUDA plugin build regression

Ulrich Weigand via Openmp-commits openmp-commits at lists.llvm.org
Wed Mar 6 12:02:08 PST 2024


Author: Ulrich Weigand
Date: 2024-03-06T21:00:25+01:00
New Revision: b64482e23eefaef7738fde35d0b7c4174aaa6597

URL: https://github.com/llvm/llvm-project/commit/b64482e23eefaef7738fde35d0b7c4174aaa6597
DIFF: https://github.com/llvm/llvm-project/commit/b64482e23eefaef7738fde35d0b7c4174aaa6597.diff

LOG: [libomptarget] Fix CUDA plugin build regression

After 3ecd38c8e, the Handler.getELFObjectFile routine is no
longer available.  Call ELF64LEObjectFile::create directly,
which should always be suitable for CUDA images.

Added: 
    

Modified: 
    openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
index f85a00cd1cd530..e9742c9a13dea0 100644
--- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
@@ -1160,7 +1160,7 @@ struct CUDADeviceTy : public GenericDeviceTy {
     // automatically so we must create it ourselves. The backend will emit
     // several globals that contain function pointers we can call. These are
     // prefixed with a known name due to Nvidia's lack of section support.
-    auto ELFObjOrErr = Handler.getELFObjectFile(Image);
+    auto ELFObjOrErr = ELF64LEObjectFile::create(Image.getMemoryBuffer());
     if (!ELFObjOrErr)
       return ELFObjOrErr.takeError();
 


        


More information about the Openmp-commits mailing list