<div dir="ltr">The openmp devicertl is version locked to clang. Roughly, we change clang and the devicertl at the same time, in ABI and API breaking fashion.<div><br></div><div>Clang searches for the devicertl to link in CommonArgs.cpp, tools::addOpenMPDeviceRTL.  That starts,</div><div><br></div><div>SmallVector<StringRef, 8> LibraryPaths;</div>  // Add user defined library paths from LIBRARY_PATH.                                                                                                                                                             <br>  auto LibPath = llvm::sys::Process::GetEnv("LIBRARY_PATH");<br>  if (LibPath) {<br> ...      LibraryPaths.emplace_back(Path.trim());<br>  }<br><div><br></div><div>That is, LIBRARY_PATH gets looked in first. There's no particular guarantee that LIBRARY_PATH has anything to do with the current compiler, e.g. on a HPC system it probably points to some other loaded compiler.</div><div><br></div><div>User specified wins. That's good. If the user doesn't specify one, first point in LIBRARY_PATH wins, which isn't especially likely to be the one that we shipped with clang.</div><div><br></div><div>I think that is a severe bug. If the user doesn't specify a library, we should use the one from clang's lib directory. if there isn't one there, we should error. Grabbing a bitcode file from somewhere else in the filesystem has minimal chance of working and I doubt the error symptoms are helpful.</div><div><br></div><div>Anyone dead set against me ripping out that 'feature'?</div><div><br></div><div>Thanks!</div><div><br></div><div>Jon</div></div>