[libc-commits] [libc] [libc][NFC] Clean up GPU utilities directory after rework (PR #83692)

via libc-commits libc-commits at lists.llvm.org
Sat Mar 2 12:57:50 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

<details>
<summary>Changes</summary>

Summary:
This CMake can be cleaned up now that the AMDGPU and NVPTX builds do not
share a CMake invocation.


---
Full diff: https://github.com/llvm/llvm-project/pull/83692.diff


1 Files Affected:

- (modified) libc/src/__support/GPU/CMakeLists.txt (+3-5) 


``````````diff
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

``````````

</details>


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


More information about the libc-commits mailing list