From 7af2e404ddea4457fc46018560651c3657a48f0b Mon Sep 17 00:00:00 2001 From: Juan Gu Date: Tue, 25 Oct 2022 21:04:53 +0000 Subject: SERVER-63211 icecream 1.1 will use wrong objcopy --- site_scons/site_tools/icecream.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'site_scons') diff --git a/site_scons/site_tools/icecream.py b/site_scons/site_tools/icecream.py index f84dddc849a..e7340b51f16 100644 --- a/site_scons/site_tools/icecream.py +++ b/site_scons/site_tools/icecream.py @@ -29,7 +29,7 @@ from pkg_resources import parse_version import SCons -_icecream_version_min = parse_version("1.1rc2") +_icecream_version_min = parse_version("1.3") _icecream_version_gcc_remote_cpp = parse_version("1.2") @@ -84,13 +84,6 @@ def icecc_create_env(env, target, source, for_signature): def generate(env): - # icecc lower then 1.1 supports addfile remapping accidentally - # and above it adds an empty cpuinfo so handle cpuinfo issues for icecream - # below version 1.1 - if (env['ICECREAM_VERSION'] <= parse_version('1.1') and env.ToolchainIs("clang") - and os.path.exists('/proc/cpuinfo')): - env.AppendUnique(ICECC_CREATE_ENV_ADDFILES=[('/proc/cpuinfo', '/dev/null')]) - # Absoluteify, so we can derive ICERUN env["ICECC"] = env.WhereIs("$ICECC") @@ -585,15 +578,14 @@ def exists(env): icecc_version = re.split("ICECC (.+)", line) if len(icecc_version) < 2: continue - icecc_version = parse_version(icecc_version[1]) - if icecc_version >= _icecream_version_min: + icecc_current_version = parse_version(icecc_version[1]) + if icecc_current_version >= _icecream_version_min: validated = True - - if validated: - env['ICECREAM_VERSION'] = icecc_version - else: + if icecc_current_version: + env['ICECREAM_VERSION'] = icecc_current_version + if not validated: print( - f"Error: failed to verify icecream version >= {_icecream_version_min}, found {icecc_version}" + f"Error: failed to verify icecream version >= {_icecream_version_min}, found {icecc_current_version}" ) return validated -- cgit v1.2.1