[Openmp-commits] [PATCH] D102229: [libomptarget][nfc] Add hook to easily disable building amdgcn bclib

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 14 13:28:22 PDT 2021


protze.joachim added a comment.

It seems like a change in this patch introduced a dependency issue for fresh builds.



================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt:158
     OUTPUT ${bc_libname}
     COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname}
     DEPENDS ${bc_files})
----------------
When I build openmp as LLVM runtime (-DLLVM_ENABLE_RUNTIMES=openmp) in a fresh build directory, opt is not ready when this target should get built. I usually build massively parallel(-j48), so dependency issues will pop up from time to time.
I don't know why this did not happen before, but now this target misses a dependency to the OPT_TOOL built in the outer build process. 
I find these lines in my build log:
```
[101/206] Generating libomptarget-amdgcn-gfx701.bc
FAILED: openmp/libomptarget/deviceRTLs/amdgcn/libomptarget-amdgcn-gfx701.bc 
cd build-main/runtimes/runtimes-bins/openmp/libomptarget/deviceRTLs/amdgcn && build-main/bin/llvm-link linkout.cuda.gfx701.bc | build-main/bin/opt --always-inline -o build-main/runtimes/runtimes-bins/openmp/libomptarget/libomptarget-amdgcn-gfx701.bc
/bin/sh: build-main/bin/opt: permission denied
...
[5987/5995] Linking CXX executable bin/opt
```

When I revert this patch, I don't see the line about linking bin/opt at all. I have no idea, how this patch impacts the use of opt ?!?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102229/new/

https://reviews.llvm.org/D102229



More information about the Openmp-commits mailing list