summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2016-10-31 13:27:15 -0400
committerMathias Stearn <mathias@10gen.com>2016-11-03 15:16:50 -0400
commitb0885dbb66f94332a3cf8ab5bf2565b70cd59384 (patch)
tree035dfed6202a3759cf1c71a5ebdf81d710616f42 /SConstruct
parent0d81fcad5453c05b101b9bf6f69da2e203331543 (diff)
downloadmongo-b0885dbb66f94332a3cf8ab5bf2565b70cd59384.tar.gz
SERVER-25679 Fix compile with clang-3.9
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct6
1 files changed, 6 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 9c670beb995..aa4a0b52035 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1906,6 +1906,12 @@ def doConfigure(myenv):
# see: http://stackoverflow.com/questions/21755206/how-to-get-around-gcc-void-b-4-may-be-used-uninitialized-in-this-funct
AddToCXXFLAGSIfSupported(myenv, "-Wno-maybe-uninitialized")
+ # Disable warning about templates that can't be implicitly instantiated. It is an attempt to
+ # make a link error into an easier-to-debug compiler failure, but it triggers false
+ # positives if explicit instantiation is used in a TU that can see the full definition. This
+ # is a problem at least for the S2 headers.
+ AddToCXXFLAGSIfSupported(myenv, "-Wno-undefined-var-template")
+
# Check if we can set "-Wnon-virtual-dtor" when "-Werror" is set. The only time we can't set it is on
# clang 3.4, where a class with virtual function(s) and a non-virtual destructor throws a warning when
# it shouldn't.