build: log detected compilers in --verbose mode
Log the versions of the detected compilers when the configure script is run with `--verbose` to help verify which compiler is being used if multiple toolchains are installed on the system. Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/32715 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
aeb7084fe6
commit
7251e8c268
10
configure.py
10
configure.py
@ -826,13 +826,19 @@ def check_compiler(o):
|
|||||||
return
|
return
|
||||||
|
|
||||||
ok, is_clang, clang_version, gcc_version = try_check_compiler(CXX, 'c++')
|
ok, is_clang, clang_version, gcc_version = try_check_compiler(CXX, 'c++')
|
||||||
|
version_str = ".".join(map(str, clang_version if is_clang else gcc_version))
|
||||||
|
print_verbose('Detected %sC++ compiler (CXX=%s) version: %s' %
|
||||||
|
('clang ' if is_clang else '', CXX, version_str))
|
||||||
if not ok:
|
if not ok:
|
||||||
warn('failed to autodetect C++ compiler version (CXX=%s)' % CXX)
|
warn('failed to autodetect C++ compiler version (CXX=%s)' % CXX)
|
||||||
elif clang_version < (8, 0, 0) if is_clang else gcc_version < (6, 3, 0):
|
elif clang_version < (8, 0, 0) if is_clang else gcc_version < (6, 3, 0):
|
||||||
warn('C++ compiler (CXX=%s, %s) too old, need g++ 6.3.0 or clang++ 8.0.0' %
|
warn('C++ compiler (CXX=%s, %s) too old, need g++ 6.3.0 or clang++ 8.0.0' %
|
||||||
(CXX, ".".join(map(str, clang_version if is_clang else gcc_version))))
|
(CXX, version_str))
|
||||||
|
|
||||||
ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c')
|
ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c')
|
||||||
|
version_str = ".".join(map(str, clang_version if is_clang else gcc_version))
|
||||||
|
print_verbose('Detected %sC compiler (CC=%s) version: %s' %
|
||||||
|
('clang ' if is_clang else '', CC, version_str))
|
||||||
if not ok:
|
if not ok:
|
||||||
warn('failed to autodetect C compiler version (CC=%s)' % CC)
|
warn('failed to autodetect C compiler version (CC=%s)' % CC)
|
||||||
elif not is_clang and gcc_version < (4, 2, 0):
|
elif not is_clang and gcc_version < (4, 2, 0):
|
||||||
@ -840,7 +846,7 @@ def check_compiler(o):
|
|||||||
# do for the C bits. However, we might as well encourage people to upgrade
|
# do for the C bits. However, we might as well encourage people to upgrade
|
||||||
# to a version that is not completely ancient.
|
# to a version that is not completely ancient.
|
||||||
warn('C compiler (CC=%s, %s) too old, need gcc 4.2 or clang 3.2' %
|
warn('C compiler (CC=%s, %s) too old, need gcc 4.2 or clang 3.2' %
|
||||||
(CC, ".".join(map(str, gcc_version))))
|
(CC, version_str))
|
||||||
|
|
||||||
o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else '0.0'
|
o['variables']['llvm_version'] = get_llvm_version(CC) if is_clang else '0.0'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user