[libc-commits] [libc] f8e543b - [libc] Suppress error message from the arch tools if they fail

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Apr 24 07:45:36 PDT 2023


Author: Joseph Huber
Date: 2023-04-24T09:45:26-05:00
New Revision: f8e543b3a08320b97c138091b0798a7c09ceabe6

URL: https://github.com/llvm/llvm-project/commit/f8e543b3a08320b97c138091b0798a7c09ceabe6
DIFF: https://github.com/llvm/llvm-project/commit/f8e543b3a08320b97c138091b0798a7c09ceabe6.diff

LOG: [libc] Suppress error message from the arch tools if they fail

Summary:
These tools are used to query amdgpu-arch and nvptx-arch. We shouldn't
print their errors to the console if they do fail.

Added: 
    

Modified: 
    libc/cmake/modules/prepare_libc_gpu_build.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index 5d7d8ac2b0fca..79afa383b00e3 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -44,7 +44,7 @@ foreach(arch_tool ${LIBC_NVPTX_ARCH} ${LIBC_AMDGPU_ARCH})
   if(arch_tool)
     execute_process(COMMAND ${arch_tool}
                     OUTPUT_VARIABLE arch_tool_output
-                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+                    ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
     string(REPLACE "\n" ";" arch_list "${arch_tool_output}")
     list(APPEND detected_gpu_architectures "${arch_list}")
   endif()


        


More information about the libc-commits mailing list