summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2020-08-14 15:06:43 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-14 18:02:29 +0000
commite7653706fd52bf02e55a72a174a051ce349d0cf7 (patch)
tree5663f5017d08876ed29da0e74db6af299c8816e7 /SConstruct
parentd6183f94ebb21465ce1a148a58b214b32804b47e (diff)
downloadmongo-e7653706fd52bf02e55a72a174a051ce349d0cf7.tar.gz
SERVER-49875 Added check to only allow supported gcov configuration
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct6
1 files changed, 5 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index be667b33090..a39999e7a41 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2051,7 +2051,11 @@ if env.TargetOSIs('posix'):
except KeyError:
pass
- if env.TargetOSIs('linux') and has_option( "gcov" ):
+ if has_option( "gcov" ):
+ if not (env.TargetOSIs('linux') and env.ToolchainIs('gcc')):
+ # TODO: This should become supported under: https://jira.mongodb.org/browse/SERVER-49877
+ env.FatalError("Coverage option 'gcov' is currently only supported on linux with gcc. See SERVER-49877.")
+
env.Append( CCFLAGS=["-fprofile-arcs", "-ftest-coverage", "-fprofile-update=single"] )
env.Append( LINKFLAGS=["-fprofile-arcs", "-ftest-coverage", "-fprofile-update=single"] )