[libc-commits] [PATCH] D155812: [libc][amdgpu] Tolerate different install directories for hsa.h
Jon Chesterfield via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jul 20 05:43:40 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd483824fc8ed: [libc][amdgpu] Tolerate different install directories for hsa.h (authored by JonChesterfield).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155812/new/
https://reviews.llvm.org/D155812
Files:
libc/utils/gpu/loader/amdgpu/Loader.cpp
Index: libc/utils/gpu/loader/amdgpu/Loader.cpp
===================================================================
--- libc/utils/gpu/loader/amdgpu/Loader.cpp
+++ libc/utils/gpu/loader/amdgpu/Loader.cpp
@@ -15,8 +15,18 @@
#include "Loader.h"
-#include <hsa/hsa.h>
-#include <hsa/hsa_ext_amd.h>
+#if defined(__has_include)
+#if __has_include("hsa/hsa.h")
+#include "hsa/hsa.h"
+#include "hsa/hsa_ext_amd.h"
+#elif __has_include("hsa.h")
+#include "hsa.h"
+#include "hsa_ext_amd.h"
+#endif
+#else
+#include "hsa/hsa.h"
+#include "hsa/hsa_ext_amd.h"
+#endif
#include <cstdio>
#include <cstdlib>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155812.542459.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230720/90afa0c9/attachment-0001.bin>
More information about the libc-commits
mailing list