Skip to content

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Mar 2, 2024

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

Summary:
This CMake can be cleaned up now that the AMDGPU and NVPTX builds do not
share a CMake invocation.
@llvmbot llvmbot added the libc label Mar 2, 2024
@llvmbot
Copy link
Member

llvmbot commented Mar 2, 2024

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

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

@jhuber6 jhuber6 merged commit 32e2294 into llvm:main Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants