summaryrefslogtreecommitdiff
path: root/SConscript.buildinfo
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2012-12-18 15:03:14 -0500
committerScott Hernandez <scotthernandez@gmail.com>2012-12-18 15:03:14 -0500
commit9e2543ec729da2a2176dc374ced0f2d29f723ad6 (patch)
tree2f4ac11144168cbf12c926415e2f012dc9ce4cf9 /SConscript.buildinfo
parentd718db426cef14ab4ecccff4d2233f95fed81f82 (diff)
downloadmongo-9e2543ec729da2a2176dc374ced0f2d29f723ad6.tar.gz
SERVER-7856: record allocator and build flags in buildinfo
Diffstat (limited to 'SConscript.buildinfo')
-rw-r--r--SConscript.buildinfo10
1 files changed, 9 insertions, 1 deletions
diff --git a/SConscript.buildinfo b/SConscript.buildinfo
index d9c702f0648..6e9e69cf0c9 100644
--- a/SConscript.buildinfo
+++ b/SConscript.buildinfo
@@ -26,6 +26,9 @@ buildinfo_template = '''
namespace mongo {
const char * gitVersion() { return "%(git_version)s"; }
+ const char * allocator() { return "%(allocator)s"; }
+ const char * loaderFlags() { return "%(loader_flags)s"; }
+ const char * compilerFlags() { return "%(compiler_flags)s"; }
std::string sysInfo() { return "%(sys_info)s BOOST_LIB_VERSION=" BOOST_LIB_VERSION ; }
} // namespace mongo
'''
@@ -36,7 +39,12 @@ def generate_buildinfo(env, target, source, **kw):
git_version += " modules: " + ", ".join(env["MONGO_MODULES"])
contents = str(source[0]) % dict(git_version=git_version,
- sys_info=getSysInfo())
+ sys_info=getSysInfo(),
+ allocator=GetOption('allocator'),
+ loader_flags=env.subst('$LINKFLAGS $LDFLAGS',
+ source=source, target=target),
+ compiler_flags=env.subst('$CXXFLAGS $CCFLAGS $CFLAGS',
+ source=source, target=target))
out = open(str(target[0]), 'wb')
try:
out.write(contents)