summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2019-08-14 16:33:40 -0400
committerMathew Robinson <chasinglogic@gmail.com>2019-08-16 16:05:24 -0400
commit166a5d78c1103a58dbd41d1e45aa6037ba4a3e42 (patch)
treecb66275b7bcc65411e4639fca37057e83037e523 /site_scons
parentb0815d97b1ff33f2977124908859411312a4eba5 (diff)
downloadmongo-166a5d78c1103a58dbd41d1e45aa6037ba4a3e42.tar.gz
SERVER-42664 Correct usage of ICECC_VERSION
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/icecream.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/site_scons/site_tools/icecream.py b/site_scons/site_tools/icecream.py
index 3e231032b28..0abb469e63c 100644
--- a/site_scons/site_tools/icecream.py
+++ b/site_scons/site_tools/icecream.py
@@ -56,8 +56,7 @@ def generate(env):
# then fetch it to somewhere under $BUILD_ROOT/scons/icecc
# with its "correct" name (i.e. the md5 hash), and symlink it
# to some other deterministic name to use as icecc_version.
-
- pass
+ env["ENV"]["ICECC_VERSION"] = env["ICECC_VERSION"]
else:
# Make a predictable name for the toolchain
icecc_version_target_filename = env.subst('$CC$CXX').replace('/', '_')
@@ -124,7 +123,8 @@ def generate(env):
# Add ICECC_VERSION to the environment, pointed at the generated
# file so that we can expand it in the realpath expressions for
# CXXCOM and friends below.
- env['ICECC_VERSION'] = icecc_version
+ env['ICECC_SYMLINK_VERSION'] = icecc_version
+ env['ENV']['ICECC_VERSION'] = os.path.realpath(env.File("$ICECC_SYMLINK_VERSION").abspath)
if env.ToolchainIs('clang'):
env['ENV']['ICECC_CLANG_REMOTE_CPP'] = 1
@@ -138,23 +138,7 @@ def generate(env):
if 'ICECC_SCHEDULER' in env:
env['ENV']['USE_SCHEDULER'] = env['ICECC_SCHEDULER']
- # Not all platforms have the readlink utility, so create our own
- # generator for that.
- def icecc_version_gen(target, source, env, for_signature):
- f = env.File('$ICECC_VERSION')
- if not f.islink():
- return f
- return env.File(os.path.realpath(f.abspath))
- env['ICECC_VERSION_GEN'] = icecc_version_gen
-
- def icecc_version_arch_gen(target, source, env, for_signature):
- if 'ICECC_VERSION_ARCH' in env:
- return "${ICECC_VERSION_ARCH}:"
- return str()
- env['ICECC_VERSION_ARCH_GEN'] = icecc_version_arch_gen
-
# Make compile jobs flow through icecc
- env['ENV']['ICECC_VERSION'] = env.subst('${ICECC_VERSION_ARCH_GEN}${ICECC_VERSION_GEN}')
env['CCCOM'] = '$( $ICECC $) ' + env['CCCOM']
env['CXXCOM'] = '$( $ICECC $) ' + env['CXXCOM']
env['SHCCCOM'] = '$( $ICECC $) ' + env['SHCCCOM']