[libc-commits] [libc] 98697f4 - [libc] Fix LIBC_GPU_ARCHITECTURES not being used
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Tue Feb 21 11:00:25 PST 2023
Author: Joseph Huber
Date: 2023-02-21T13:00:16-06:00
New Revision: 98697f4764d7166019266e94ee5e7dfa1d4d4c5e
URL: https://github.com/llvm/llvm-project/commit/98697f4764d7166019266e94ee5e7dfa1d4d4c5e
DIFF: https://github.com/llvm/llvm-project/commit/98697f4764d7166019266e94ee5e7dfa1d4d4c5e.diff
LOG: [libc] Fix LIBC_GPU_ARCHITECTURES not being used
Summary:
This variable is supposed to control the architectures to build for. At
some point this was changes out for testing and never fixed.
Added:
Modified:
libc/cmake/modules/LLVMLibCObjectRules.cmake
libc/cmake/modules/prepare_libc_gpu_build.cmake
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 806859a37b7ba..9a3fc5a7ce2d0 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -86,7 +86,7 @@ function(_build_gpu_objects fq_target_name internal_target_name)
# The packaged version will be built for every target GPU architecture. We do
# this so we can support multiple accelerators on the same machine.
- foreach(gpu_arch ${all_gpu_architectures})
+ foreach(gpu_arch ${LIBC_GPU_ARCHITECTURES})
set(gpu_target_name ${fq_target_name}.${gpu_arch})
set(compile_options ${ADD_GPU_OBJ_COMPILE_OPTIONS})
# Derive the triple from the specified architecture.
diff --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index 942d82536fa42..1f9b68afd95cd 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -18,7 +18,7 @@ if(LIBC_GPU_ARCHITECTURES STREQUAL "all")
set(LIBC_GPU_ARCHITECTURES ${all_gpu_architectures} FORCE)
endif()
message(STATUS "Building libc for the following GPU architectures: "
- "${all_gpu_architectures}")
+ "${LIBC_GPU_ARCHITECTURES}")
# Ensure the compiler is a valid clang when building the GPU target.
set(req_ver "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
More information about the libc-commits
mailing list