summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2019-02-11 17:55:50 -0500
committerAndrew Morrow <acm@mongodb.com>2019-02-18 13:40:25 -0500
commit62b59e76360beba3854d74a27693ef4c84182c50 (patch)
tree79d1fcc6af6345d4d7026618107b653df6eed418
parent281c60d09ab041c8db0c7afbc2bbdb771b670264 (diff)
downloadmongo-62b59e76360beba3854d74a27693ef4c84182c50.tar.gz
SERVER-39483 Tag large build artifacts as non-cacheable
(cherry picked from commit 87881b0424d3706f57efa14b26729c9b5a7a0d4d) (cherry picked from commit 861fbd17473634d3ef991783e74a42b8c873e51b)
-rw-r--r--SConstruct18
-rw-r--r--src/mongo/SConscript13
-rw-r--r--src/mongo/installer/msi/SConscript2
3 files changed, 24 insertions, 9 deletions
diff --git a/SConstruct b/SConstruct
index 1512d3a4f52..48a56dae3ab 100644
--- a/SConstruct
+++ b/SConstruct
@@ -3278,12 +3278,20 @@ vcxprojFile = env.Command(
r"$PYTHON buildscripts\make_vcxproj.py mongodb")
vcxproj = env.Alias("vcxproj", vcxprojFile)
-env.Alias("distsrc-tar", env.DistSrc("mongodb-src-${MONGO_VERSION}.tar"))
-env.Alias("distsrc-tgz", env.GZip(
+distSrc = env.DistSrc("mongodb-src-${MONGO_VERSION}.tar")
+env.NoCache(distSrc)
+env.Alias("distsrc-tar", distSrc)
+
+distSrcGzip = env.GZip(
target="mongodb-src-${MONGO_VERSION}.tgz",
- source=["mongodb-src-${MONGO_VERSION}.tar"])
-)
-env.Alias("distsrc-zip", env.DistSrc("mongodb-src-${MONGO_VERSION}.zip"))
+ source=[distSrc])
+env.NoCache(distSrcGzip)
+env.Alias("distsrc-tgz", distSrcGzip)
+
+distSrcZip = env.DistSrc("mongodb-src-${MONGO_VERSION}.zip")
+env.NoCache(distSrcZip)
+env.Alias("distsrc-zip", distSrcZip)
+
env.Alias("distsrc", "distsrc-tgz")
# Defaults for SCons provided flags. SetOption only sets the option to our value
diff --git a/src/mongo/SConscript b/src/mongo/SConscript
index 26c9d6b1c90..f162999decd 100644
--- a/src/mongo/SConscript
+++ b/src/mongo/SConscript
@@ -543,17 +543,20 @@ def installBinary( e, name ):
name,
debug_sym_cmd
)
+ e.NoCache(debug_sym)
e.Install("#/", debug_sym)
e.Alias('debugsymbols', debug_sym)
distDebugSymbols.append(debug_sym)
if env.TargetOSIs('linux', 'solaris') and (not has_option("nostrip")):
+ stripped_name = 'stripped/%s' % name
strip_cmd = e.Command(
- 'stripped/%s' % name,
+ stripped_name,
[name, debug_sym],
'${OBJCOPY} --strip-debug --add-gnu-debuglink ${SOURCES[1]} ${SOURCES[0]} $TARGET'
)
- distBinaries.append('stripped/%s' % name)
+ e.NoCache(stripped_name)
+ distBinaries.append(stripped_name)
else:
distBinaries.append(name)
@@ -661,7 +664,7 @@ if env.TargetOSIs('posix'):
# "dist" target is valid only when --use-new-tools is specified
# Attempts to build release artifacts without tools must fail
if has_option("use-new-tools"):
- env.Command(
+ server_archive = env.Command(
target='#/${SERVER_ARCHIVE}',
source=['#buildscripts/make_archive.py'] + env["MODULE_BANNERS"] + env["ARCHIVE_ADDITIONS"] + distBinaries,
action=' '.join(
@@ -682,7 +685,8 @@ if has_option("use-new-tools"):
BUILD_DIR=env.Dir('$BUILD_DIR').path
)
- env.Alias("dist", source='#/${SERVER_ARCHIVE}')
+ env.Alias("dist", server_archive)
+ env.NoCache(server_archive)
else:
def failDist(env, target, source):
env.FatalError("ERROR: 'dist' target only valid with --use-new-tools.")
@@ -704,6 +708,7 @@ debug_symbols_dist = env.Command(
)
env.Alias('dist-debugsymbols', debug_symbols_dist)
+env.NoCache(debug_symbols_dist)
#final alias
env.Alias( "install", "$INSTALL_DIR" )
diff --git a/src/mongo/installer/msi/SConscript b/src/mongo/installer/msi/SConscript
index 1c7ebdfa835..9b901398635 100644
--- a/src/mongo/installer/msi/SConscript
+++ b/src/mongo/installer/msi/SConscript
@@ -146,6 +146,7 @@ pre_msi_cmd = env.Command(pre_msi,
'"$WIXLIGHT" -out ${TARGET} -wx -cultures:null -sice:ICE82 -sice:ICE03'
' -ext "$WIXUIEXT" -ext "$WIXUTILEXT"'
' ${SOURCES}')
+env.NoCache(pre_msi_cmd)
env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongo.exe')
env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongod.exe')
@@ -161,5 +162,6 @@ env.Command(msi,
pre_msi,
r'$PYTHON buildscripts\msitrim.py ${SOURCES} ${TARGET}')
env.AlwaysBuild(msi)
+env.NoCache(msi)
env.Alias( "msi" , msi )