summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neben <alexander.neben@mongodb.com>2022-05-24 21:55:23 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-25 19:45:54 +0000
commit78889bdd2b6c6180483d97e5fa220aa660f23a03 (patch)
tree1677c094edfafd1819abe022dbe29f8b115f4a3a
parent8bcf420fbfaeb218a0bee3e5265da04c2b0f8109 (diff)
downloadmongo-78889bdd2b6c6180483d97e5fa220aa660f23a03.tar.gz
SERVER-66384 Ninja shared build log and common output directory
(cherry picked from commit 55ef8e5a8f084a68efa3e8ba148fb77d72117c49)
-rw-r--r--SConstruct9
-rw-r--r--etc/scons/experimental_unified_ninja.vars6
2 files changed, 12 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index 06037bd1791..539bd768190 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2,7 +2,6 @@
import atexit
import copy
-import datetime
import errno
import json
import os
@@ -953,6 +952,11 @@ env_vars.Add('MSVC_VERSION',
help='Sets the version of Visual C++ to use (e.g. 14.2 for VS2019, 14.3 for VS2022)',
default="14.3")
+env_vars.Add('NINJA_BUILDDIR',
+ help="Location for shared Ninja state",
+ default="$BUILD_DIR/ninja",
+)
+
env_vars.Add('NINJA_PREFIX',
default="build",
help="""A prefix to add to the beginning of generated ninja
@@ -1198,7 +1202,6 @@ envDict = dict(BUILD_ROOT=buildDir,
LIBDEPS_TAG_EXPANSIONS=[],
)
-
# By default, we will get the normal SCons tool search. But if the
# user has opted into the next gen tools, add our experimental tool
# directory into the default toolpath, ahead of whatever is already in
@@ -4626,7 +4629,7 @@ if get_option('ninja') != 'disabled':
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("$BUILD_DIR/ninja")
+ env["NINJA_BUILDDIR"] = env.Dir("$NINJA_BUILDDIR")
ninja_builder.generate(env)
ninjaConf = Configure(env, help=False, custom_tests = {
diff --git a/etc/scons/experimental_unified_ninja.vars b/etc/scons/experimental_unified_ninja.vars
new file mode 100644
index 00000000000..21e03e71296
--- /dev/null
+++ b/etc/scons/experimental_unified_ninja.vars
@@ -0,0 +1,6 @@
+# Configures the build for building with a unified ninja
+# Each configuration will share a ninja log
+# This allows the output binaries of each configuration to share a common directory
+
+NINJA_BUILDDIR="$BUILD_ROOT/ninja"
+DESTDIR="$BUILD_ROOT/install"