================ @@ -794,7 +794,7 @@ void CodeGenModule::Release() { AddGlobalCtor(ObjCInitFunction); if (Context.getLangOpts().CUDA && CUDARuntime) { if (llvm::Function *CudaCtorFunction = CUDARuntime->finalizeModule()) - AddGlobalCtor(CudaCtorFunction); + AddGlobalCtor(CudaCtorFunction, /*Priority=*/0); ---------------- hahnjo wrote:
I have the same fear as @Artem-B, higher than default priorities are also sometimes reserved. We really need to see what `nvcc` does here, but what I could imagine (at least how I would solve it) is putting the constructor with the same priority before all other constructors. https://github.com/llvm/llvm-project/pull/66658 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits