summaryrefslogtreecommitdiff
path: root/libc/cmake
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-05-04 07:03:59 +0000
committerGuillaume Chatelet <gchatelet@google.com>2023-05-04 07:09:46 +0000
commitc267501c155f933a1c0cff8630826f49c5c22864 (patch)
tree23f03e957e4cd75dcab692b2ef11246e3db2ca13 /libc/cmake
parent9fb5af59095f3f3578e11b008c98ae56c03f0102 (diff)
downloadllvm-c267501c155f933a1c0cff8630826f49c5c22864.tar.gz
[libc] Use proper flags for compiler version detection
The `-v` flag means verbose and not version. With `clang` this flag prints the version and exits successfully. Under `GCC` this is not a valid command line so the binary exits with an error.
Diffstat (limited to 'libc/cmake')
-rw-r--r--libc/cmake/modules/LLVMLibCArchitectures.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake
index 63ec2ef7a286..f3852e1b9e05 100644
--- a/libc/cmake/modules/LLVMLibCArchitectures.cmake
+++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake
@@ -76,7 +76,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} --version -v
RESULT_VARIABLE libc_compiler_info_result
OUTPUT_VARIABLE libc_compiler_info
ERROR_VARIABLE libc_compiler_info)