[clang] Fix amdgpu-arch for dll name on Windows (PR #101350)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 14:22:39 PDT 2024


================
@@ -31,16 +44,118 @@ typedef hipError_t (*hipGetDeviceCount_t)(int *);
 typedef hipError_t (*hipDeviceGet_t)(int *, int);
 typedef hipError_t (*hipGetDeviceProperties_t)(hipDeviceProp_t *, int);
 
-int printGPUsByHIP() {
+extern cl::opt<bool> Verbose;
+
 #ifdef _WIN32
-  constexpr const char *DynamicHIPPath = "amdhip64.dll";
+static std::vector<std::string> getSearchPaths() {
----------------
arsenm wrote:

Do you really need to reproduce this type of path logic? Should this look like or share with findProgramByName?  (e.g. use SearchPathW)

https://github.com/llvm/llvm-project/pull/101350


More information about the cfe-commits mailing list