[libc-commits] [libc] 422d023 - [libc] Pass -c to compiler when detecting target (#197012)
via libc-commits
libc-commits at lists.llvm.org
Tue May 12 07:26:45 PDT 2026
Author: Nico Weber
Date: 2026-05-12T10:26:40-04:00
New Revision: 422d023b40023d8c74e0331f08ed3c4ace409255
URL: https://github.com/llvm/llvm-project/commit/422d023b40023d8c74e0331f08ed3c4ace409255
DIFF: https://github.com/llvm/llvm-project/commit/422d023b40023d8c74e0331f08ed3c4ace409255.diff
LOG: [libc] Pass -c to compiler when detecting target (#197012)
Follow-up to #176680 where I claimed having done this, but apparantly
didn't actually add it to the commit.
Hopefully no observable behavior change; will tell the compiler to omit
linker info in its output, which we don't need for this detection step.
Added:
Modified:
libc/cmake/modules/LLVMLibCArchitectures.cmake
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake
index 8ada45dd07cec..095531c0f6bec 100644
--- a/libc/cmake/modules/LLVMLibCArchitectures.cmake
+++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake
@@ -78,7 +78,7 @@ function(get_arch_and_system_from_triple triple arch_var sys_var)
set(${sys_var} ${target_sys} PARENT_SCOPE)
endfunction(get_arch_and_system_from_triple)
-execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v
+execute_process(COMMAND ${CMAKE_CXX_COMPILER} -c -v
RESULT_VARIABLE libc_compiler_info_result
OUTPUT_VARIABLE libc_compiler_info
ERROR_VARIABLE libc_compiler_info)
More information about the libc-commits
mailing list