From 98697f4764d7166019266e94ee5e7dfa1d4d4c5e Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 21 Feb 2023 12:59:02 -0600 Subject: [PATCH] [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. --- libc/cmake/modules/LLVMLibCObjectRules.cmake | 2 +- libc/cmake/modules/prepare_libc_gpu_build.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake index 806859a3..9a3fc5a 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 942d825..1f9b68a 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}") -- 2.7.4