summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Gu <juan.gu@mongodb.com>2022-10-26 22:39:48 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-28 16:45:31 +0000
commitea921842b91b81bce3508c131576ac3d6a9d111f (patch)
tree8743ccd64134df12b0331a010805b8c6aed8bdca
parent740e0237131f2f599cb58a7e4c24db085b5c5fca (diff)
downloadmongo-ea921842b91b81bce3508c131576ac3d6a9d111f.tar.gz
SERVER-67681 Create specific target for compile commands
(cherry picked from commit 3a31638a3c0bc80fe03faf0bafba5aefaefc2b84)
-rw-r--r--SConstruct5
-rw-r--r--site_scons/mongo/build_profiles.py6
2 files changed, 9 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index b0b7fde7c28..83676917d82 100644
--- a/SConstruct
+++ b/SConstruct
@@ -444,8 +444,9 @@ add_option("disable-warnings-as-errors",
action="append",
choices=["configure", "source"],
const="source",
- default=[],
- help="Don't add a warnings-as-errors flag to compiler command lines in selected contexts; defaults to 'source' if no argument is provided",
+ default=build_profile.disable_warnings_as_errors,
+ help=
+ "Don't add a warnings-as-errors flag to compiler command lines in selected contexts; defaults to 'source' if no argument is provided",
nargs="?",
type="choice",
)
diff --git a/site_scons/mongo/build_profiles.py b/site_scons/mongo/build_profiles.py
index fd6388e3d2c..925b8c118a0 100644
--- a/site_scons/mongo/build_profiles.py
+++ b/site_scons/mongo/build_profiles.py
@@ -17,6 +17,7 @@ class BuildProfile:
CCACHE: Optional[str]
NINJA_PREFIX: str
VARIANT_DIR: Any
+ disable_warnings_as_errors: Optional[List]
BUILD_PROFILES = {
@@ -34,6 +35,7 @@ BUILD_PROFILES = {
CCACHE=None,
NINJA_PREFIX="build",
VARIANT_DIR=mongo_generators.default_variant_dir_generator,
+ disable_warnings_as_errors=[],
),
# This build has fast runtime speed & fast build time at the cost of debuggability.
"fast":
@@ -52,6 +54,7 @@ BUILD_PROFILES = {
CCACHE="ccache",
NINJA_PREFIX="fast",
VARIANT_DIR="fast",
+ disable_warnings_as_errors=[],
),
# This build has fast runtime speed & debuggability at the cost of build time.
"opt":
@@ -70,6 +73,7 @@ BUILD_PROFILES = {
CCACHE="ccache",
NINJA_PREFIX="opt",
VARIANT_DIR="opt",
+ disable_warnings_as_errors=[],
),
# This build leverages santizers & is the suggested build profile to use for development.
"san":
@@ -88,6 +92,7 @@ BUILD_PROFILES = {
CCACHE="ccache",
NINJA_PREFIX="san",
VARIANT_DIR="san",
+ disable_warnings_as_errors=[],
),
#These options are the preferred settings for compiledb to generating compile_commands.json
@@ -107,5 +112,6 @@ BUILD_PROFILES = {
CCACHE=None,
NINJA_PREFIX="build",
VARIANT_DIR=mongo_generators.default_variant_dir_generator,
+ disable_warnings_as_errors=['source'],
),
}