diff options
author | Juan Gu <juan.gu@mongodb.com> | 2022-10-25 21:04:53 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-25 21:32:42 +0000 |
commit | 7af2e404ddea4457fc46018560651c3657a48f0b (patch) | |
tree | 128fbc2079d0d4061cfe9f51397c8188e0675d88 | |
parent | 84b3609d0c6806f30ada0636b05734c0f7f967a4 (diff) | |
download | mongo-7af2e404ddea4457fc46018560651c3657a48f0b.tar.gz |
SERVER-63211 icecream 1.1 will use wrong objcopy
-rw-r--r-- | SConstruct | 15 | ||||
-rw-r--r-- | site_scons/site_tools/icecream.py | 22 |
2 files changed, 17 insertions, 20 deletions
diff --git a/SConstruct b/SConstruct index 8bb4630a764..6681722f882 100644 --- a/SConstruct +++ b/SConstruct @@ -5295,6 +5295,16 @@ if 'ICECC' in env and env['ICECC']: icecream = Tool('icecream') if not icecream.exists(env): + # SERVER-70648: Need to revert on how to update icecream + if 'ICECREAM_VERSION' in env and env['ICECREAM_VERSION'] < parse_version("1.3"): + env.FatalError( + textwrap.dedent(f"""\ + Please refer to the following commands to update your icecream: + sudo add-apt-repository ppa:mongodb-dev-prod/mongodb-build + sudo apt update + sudo apt-get --only-upgrade install icecc + """)) + env.FatalError(f"Failed to load icecream tool with ICECC={env['ICECC']}") icecream(env) @@ -5366,11 +5376,6 @@ if get_option('ninja') != 'disabled': if env.ToolchainIs('gcc', 'clang'): env.AppendUnique(CCFLAGS=["-fdiagnostics-color"]) - if 'ICECREAM_VERSION' in env and not env.get('CCACHE', None): - if env['ICECREAM_VERSION'] < parse_version("1.2"): - env.FatalError( - "Use of ccache is mandatory with --ninja and icecream older than 1.2. You are running {}." - .format(env['ICECREAM_VERSION'])) ninja_builder = Tool("ninja") env["NINJA_BUILDDIR"] = env.Dir("$NINJA_BUILDDIR") 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 |