| Suppose you’ve got a project where different object files are compiled with different versions of NVCC/GCC. Under what conditions can they be linked into shared objects?
As an example, assume you’ve got a project which builds with an older version of CUDA, and you’re using stdenv (not cudaPackages.backendStdenv). The CUDA portion of the build would produce object files using an older, NVCC-compatible GCC (by virtue of how we wrap NVCC so it always sees a compatible GCC), but the rest would produce object files using the GCC provided by stdenv. Linking happens with some combination of stdenv’s linker, the linker corresponding to the bintools (I think) of the GCC available to NVCC, and NVLink.
Under what conditions would linking succeed?
I ask because I remember trying to use multiple versions of LLVM-produced object files and getting something along the lines of a bitstream version mismatch, but I don’t remember if that was because I was using LTO or something else.
|