summaryrefslogtreecommitdiff
path: root/clang/tools/amdgpu-arch/AMDGPUArch.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-05-17 13:20:34 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-05-17 17:47:49 -0500
commit66da9ec073ff8dde54b70adcf3b62914769324bf (patch)
treedd1d7bc3f5c3085fb3d46ea46259424ba3180171 /clang/tools/amdgpu-arch/AMDGPUArch.cpp
parent44096e6904e10bb313fef2f6aaff25c25d1325f7 (diff)
downloadllvm-66da9ec073ff8dde54b70adcf3b62914769324bf.tar.gz
[Clang] Remove direct linking of offloading runtimes from the arch tools
The tools `amdgpu-arch` and `nvptx-arch` are used to query the supported GPUs on a system to implement features like `--offload-arch=native` as well as generally being useful for setting up tests. However, we currently directly link these if they are availible. This patch removes this because it causes many problems on the user not having the libaries present or misconfigured at build time. Since these are built unconditionally we shoudl keep the dependencies away from clang. Fixes https://github.com/llvm/llvm-project/issues/62784 Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D150807
Diffstat (limited to 'clang/tools/amdgpu-arch/AMDGPUArch.cpp')
-rw-r--r--clang/tools/amdgpu-arch/AMDGPUArch.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/clang/tools/amdgpu-arch/AMDGPUArch.cpp b/clang/tools/amdgpu-arch/AMDGPUArch.cpp
index b63ff5cfe175..17d188adc3b7 100644
--- a/clang/tools/amdgpu-arch/AMDGPUArch.cpp
+++ b/clang/tools/amdgpu-arch/AMDGPUArch.cpp
@@ -30,7 +30,6 @@ static void PrintVersion(raw_ostream &OS) {
OS << clang::getClangToolFullVersion("amdgpu-arch") << '\n';
}
-#if DYNAMIC_HSA
typedef enum {
HSA_STATUS_SUCCESS = 0x0,
} hsa_status_t;
@@ -80,18 +79,6 @@ llvm::Error loadHSA() {
#undef DYNAMIC_INIT
return llvm::Error::success();
}
-#else
-
-#if defined(__has_include)
-#if __has_include("hsa/hsa.h")
-#include "hsa/hsa.h"
-#elif __has_include("hsa.h")
-#include "hsa.h"
-#endif
-#endif
-
-llvm::Error loadHSA() { return llvm::Error::success(); }
-#endif
static hsa_status_t iterateAgentsCallback(hsa_agent_t Agent, void *Data) {
hsa_device_type_t DeviceType;