Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
The resources dir, containing opnecl-c.h is fixed at compile time:
If libclang gets a minor version upgrade later (e.g. from 8.0.0 to 8.0.1), the header is still searched for in the old location (e.g. /usr/lib64/clang/8.0.0/include/opencl-c.h). As the SOVERSION is unchanged, is is typically not picked up by the regular dependency mechanisms.
Related Debian bug report:
With LLVM master (> 8.0), the Resources patch can be queried with llvm::driver::Driver::GetResourcesPath(binarydir)
When the resources dir is determined at compile time, it also includes the full version (e.g. /usr/lib64/clang/8.0.0/include/opencl-c.h). If clang gets a minor version update later (e.g. from 8.0.0 to 8.0.1), pocl will still add the obsolete path for the header lookup. Determine the path at runtime instead. LLVM 9.0 adds a static method llvm::driver::Driver::GetResourcesPath(...) which can be used, LLVM 8.0 and older have to use a dummy Driver instance. Fixes pocl#747.