From: Joseph Huber Date: Tue, 21 Feb 2023 18:59:02 +0000 (-0600) Subject: [libc] Fix LIBC_GPU_ARCHITECTURES not being used X-Git-Tag: upstream/17.0.6~16870 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98697f4764d7166019266e94ee5e7dfa1d4d4c5e;p=platform%2Fupstream%2Fllvm.git [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. --- 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}")