Skip to content

Commit a86648c

Browse files
richardlautargos
authored andcommitted
build: log the found compiler version if too old
`configure` will log a warning if the detected compiler is not new enough. Take some of the guesswork out of it by also logging the version of the compiler that was detected. PR-URL: #30028 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: David Carlier <[email protected]>
1 parent 870c320 commit a86648c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

configure.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,8 @@ def check_compiler(o):
773773
if not ok:
774774
warn('failed to autodetect C++ compiler version (CXX=%s)' % CXX)
775775
elif clang_version < (8, 0, 0) if is_clang else gcc_version < (6, 3, 0):
776-
warn('C++ compiler too old, need g++ 6.3.0 or clang++ 8.0.0 (CXX=%s)' % CXX)
776+
warn('C++ compiler (CXX=%s, %s) too old, need g++ 6.3.0 or clang++ 8.0.0' %
777+
(CXX, ".".join(map(str, clang_version if is_clang else gcc_version))))
777778

778779
ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c')
779780
if not ok:
@@ -782,7 +783,8 @@ def check_compiler(o):
782783
# clang 3.2 is a little white lie because any clang version will probably
783784
# do for the C bits. However, we might as well encourage people to upgrade
784785
# to a version that is not completely ancient.
785-
warn('C compiler too old, need gcc 4.2 or clang 3.2 (CC=%s)' % CC)
786+
warn('C compiler (CC=%s, %s) too old, need gcc 4.2 or clang 3.2' %
787+
(CC, ".".join(map(str, gcc_version))))
786788

787789
o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else '0.0'
788790

0 commit comments

Comments
 (0)