summaryrefslogtreecommitdiff
path: root/libc/cmake
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-04-14 15:05:40 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-04-14 15:14:08 -0500
commit77f4e38d0b8a19f6265e1341f962666e29de1c05 (patch)
tree56ebc7b9ee859d52811fc1768c99ef537f3b414d /libc/cmake
parentee6abfc5ea469e5f6e35c8423b6b7dceccd39430 (diff)
downloadllvm-77f4e38d0b8a19f6265e1341f962666e29de1c05.tar.gz
[libc] Remove duplicate architecture from the detected list
Summary: When we detect the architectures via `native` we can have systems with multiple of the same GPU. We need to remove duplicates or else we will try to build the same target multiple times.
Diffstat (limited to 'libc/cmake')
-rw-r--r--libc/cmake/modules/prepare_libc_gpu_build.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index 21851285c624..5d7d8ac2b0fc 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -49,6 +49,7 @@ foreach(arch_tool ${LIBC_NVPTX_ARCH} ${LIBC_AMDGPU_ARCH})
list(APPEND detected_gpu_architectures "${arch_list}")
endif()
endforeach()
+list(REMOVE_DUPLICATES detected_gpu_architectures)
if(LIBC_GPU_ARCHITECTURES STREQUAL "all")
set(LIBC_GPU_ARCHITECTURES ${all_gpu_architectures})