diff options
author | Jason Carey <jcarey@argv.me> | 2016-04-06 13:32:33 -0400 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2016-04-19 15:31:14 -0400 |
commit | 6d7be60bbbf5a6be21c57398ab8616c4241b50a7 (patch) | |
tree | 9c4091cededc49d7de44d4ae9c7a6ee4df54f049 /SConstruct | |
parent | 3f86bc56c7e3e9c69ab0725e2b140a1d1f138062 (diff) | |
download | mongo-6d7be60bbbf5a6be21c57398ab8616c4241b50a7.tar.gz |
SERVER-23570 Make SecureAllocator a real allocator
Also adds SecureT, a wrapper proxy for newing objects on the secure heap.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 29ead390c3a..15333ec25f5 100644 --- a/SConstruct +++ b/SConstruct @@ -2334,6 +2334,32 @@ def doConfigure(myenv): myenv = conf.Finish() + def CheckCXX11Align(context): + test_body = """ + #include <memory> + int main(int argc, char **argv) { + char buf[100]; + void* ptr = static_cast<void*>(buf); + std::size_t size = sizeof(buf); + auto foo = std::align(16, 16, ptr, size); + return 0; + } + """ + context.Message('Checking for C++11 std::align support... ') + ret = context.TryCompile(textwrap.dedent(test_body), '.cpp') + context.Result(ret) + return ret + + # Check for std::align support + conf = Configure(myenv, help=False, custom_tests = { + 'CheckCXX11Align': CheckCXX11Align, + }) + + if conf.CheckCXX11Align(): + conf.env.SetConfigHeaderDefine('MONGO_CONFIG_HAVE_STD_ALIGN') + + myenv = conf.Finish() + def CheckBoostMinVersion(context): compile_test_body = textwrap.dedent(""" #include <boost/version.hpp> |