Skip to content

Commit

Permalink
[libc] Use proper flags for compiler version detection
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gchatelet committed May 4, 2023
1 parent 9fb5af5 commit c267501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/cmake/modules/LLVMLibCArchitectures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c267501

Please sign in to comment.