mojca added a comment. Somewhat off-topic from a discussion earlier in the thread. What's the purpose of the following code then if users are supposed to explicitly specify the `-L` flag anyway?
c++ if (HostTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64")) LibPath = InstallPath + "/lib64"; else if (FS.exists(InstallPath + "/lib")) LibPath = InstallPath + "/lib"; else continue; The code above may be improved for Windows (it needs a different path there), for example like this: c++ if (HostTriple.isOSWindows() && (HostTriple.getArch() == llvm::Triple::ArchType::x86_64) && FS.exists(InstallPath + "/lib/x64")) LibPath = InstallPath + "/lib/x64"; if (HostTriple.isArch64Bit() && FS.exists(InstallPath + "/lib64")) LibPath = InstallPath + "/lib64"; else if (FS.exists(InstallPath + "/lib")) LibPath = InstallPath + "/lib"; else continue; but I fail to figure out how to make use of this variable. CMake might be able to add the right flags automatically (but it doesn't currently support Clang with CUDA on Windows), but writing the following down "manually" is relatively annoying: clang++.exe hello.cu -o hello --cuda-path="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4" -l cudart -L "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64" Also, it's probably destined to lead into issues if the user needs to manually specify the library path, while the cuda path is determined automatically. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114326/new/ https://reviews.llvm.org/D114326 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits