[libc-commits] [libc] [libc][NFC] Clean up GPU utilities directory after rework (PR #83692)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Sat Mar 2 12:57:23 PST 2024
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/83692
Summary:
This CMake can be cleaned up now that the AMDGPU and NVPTX builds do not
share a CMake invocation.
>From 0ddae11658db1cf5b24604a8cb5d308e62df9b5f Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Sat, 2 Mar 2024 14:56:39 -0600
Subject: [PATCH] [libc][NFC] Clean up GPU utilities directory after rework
Summary:
This CMake can be cleaned up now that the AMDGPU and NVPTX builds do not
share a CMake invocation.
---
libc/src/__support/GPU/CMakeLists.txt | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/libc/src/__support/GPU/CMakeLists.txt b/libc/src/__support/GPU/CMakeLists.txt
index d7ebd3cab7abe5..c181b2ed43c839 100644
--- a/libc/src/__support/GPU/CMakeLists.txt
+++ b/libc/src/__support/GPU/CMakeLists.txt
@@ -1,11 +1,9 @@
-if(NOT LIBC_TARGET_OS_IS_GPU)
+if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
return()
endif()
-foreach(target nvptx amdgpu generic)
- add_subdirectory(${target})
- list(APPEND target_gpu_utils libc.src.__support.GPU.${target}.${target}_utils)
-endforeach()
+add_subdirectory(${LIBC_TARGET_ARCHITECTURE})
+set(target_gpu_utils libc.src.__support.GPU.${LIBC_TARGET_ARCHITECTURE}.${LIBC_TARGET_ARCHITECTURE}_utils)
add_header_library(
utils
More information about the libc-commits
mailing list