diff options
author | Andrew Morrow <acm@mongodb.com> | 2019-02-11 17:55:50 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2019-02-18 12:28:51 -0500 |
commit | 861fbd17473634d3ef991783e74a42b8c873e51b (patch) | |
tree | 94101df74bd4c1da5453bacbda47aaa85e910149 | |
parent | 1ba6286466917a01292f1b6f61c7b442770d7418 (diff) | |
download | mongo-861fbd17473634d3ef991783e74a42b8c873e51b.tar.gz |
SERVER-39483 Tag large build artifacts as non-cacheable
(cherry picked from commit 87881b0424d3706f57efa14b26729c9b5a7a0d4d)
-rw-r--r-- | SConstruct | 18 | ||||
-rw-r--r-- | src/mongo/SConscript | 13 | ||||
-rw-r--r-- | src/mongo/installer/msi/SConscript | 2 |
3 files changed, 24 insertions, 9 deletions
diff --git a/SConstruct b/SConstruct index f0cca818635..07da2ec936f 100644 --- a/SConstruct +++ b/SConstruct @@ -3632,12 +3632,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 4c32ec627d1..4add4dabf69 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -580,17 +580,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) @@ -714,7 +717,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( @@ -735,7 +738,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.") @@ -757,6 +761,7 @@ debug_symbols_dist = env.Command( ) env.Alias('dist-debugsymbols', debug_symbols_dist) +env.NoCache(debug_symbols_dist) #final alias if not hygienic: diff --git a/src/mongo/installer/msi/SConscript b/src/mongo/installer/msi/SConscript index f4a8b55b1ec..561bcce9c77 100644 --- a/src/mongo/installer/msi/SConscript +++ b/src/mongo/installer/msi/SConscript @@ -159,6 +159,7 @@ pre_msi_cmd = env.Command(pre_msi, ' -ext "$WIXUIEXT"'
' -ext "$WIXUTILEXT"'
' ${SOURCES}')
+env.NoCache(pre_msi_cmd)
# Generated Dependencies
env.Depends(pre_msi_cmd, '$BUILD_DIR/mongo/mongo.exe')
@@ -179,5 +180,6 @@ env.Command(msi, pre_msi,
r'$PYTHON buildscripts\msitrim.py ${SOURCES} ${TARGET}')
env.AlwaysBuild(msi)
+env.NoCache(msi)
env.Alias( "msi" , msi )
|