diff options
author | David Storch <david.storch@10gen.com> | 2015-05-13 17:50:27 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-05-13 17:50:47 -0400 |
commit | cd97edbe4be0e6ddc9139a21e13594fd19a26a5e (patch) | |
tree | dce7d17135f5b423d03c6d497756626390de2ce3 /src/mongo | |
parent | ff7b42668a5036f5bb3b4e74b30e19062b402711 (diff) | |
download | mongo-cd97edbe4be0e6ddc9139a21e13594fd19a26a5e.tar.gz |
Revert "SERVER-18320 Remove command line from buildinfo"
This reverts commit 4d299b49129859fb15a42dfe14e3061fee67ad89.
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/SConscript | 8 | ||||
-rw-r--r-- | src/mongo/util/version.cpp.in | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript index 4fe3e1cfb92..cd05bb18ef4 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -77,6 +77,13 @@ def get_toolchain_ver(tool): return env.subst('${%s}: %s' % (tool, verstr)) js_engine_ver = get_option("js-engine") if get_option("server-js") == "on" else "none" + +# On windows, we need to escape the backslashes in the command-line +# so that windows paths look okay. +cmd_line = " ".join(sys.argv).encode('string-escape') +if env.TargetOSIs('windows'): + cmd_line = cmd_line.replace('\\', r'\\') + module_list = '{ %s }' % ', '.join([ '"{0}"'.format(x) for x in env['MONGO_MODULES'] ]) versionInfo = env.Substfile( @@ -90,6 +97,7 @@ versionInfo = env.Substfile( ('@buildinfo_cflags@', env['CFLAGS']), ('@buildinfo_cxxflags@', env['CXXFLAGS']), ('@buildinfo_linkflags@', env['LINKFLAGS']), + ('@buildinfo_cmdline@', cmd_line), ('@buildinfo_modules@', module_list), ('@buildinfo_target_arch@', env['TARGET_ARCH']), ('@buildinfo_target_os@', env.GetTargetOSName()), diff --git a/src/mongo/util/version.cpp.in b/src/mongo/util/version.cpp.in index e8d5d6d7209..a00532ac574 100644 --- a/src/mongo/util/version.cpp.in +++ b/src/mongo/util/version.cpp.in @@ -195,7 +195,8 @@ namespace mongo { opensslInfo.done(); BSONObjBuilder buildvarsInfo(result.subobjStart("buildEnvironment")); - buildvarsInfo << "cc" << "@buildinfo_cc_version@" + buildvarsInfo << "build_command" << "@buildinfo_cmdline@" + << "cc" << "@buildinfo_cc_version@" << "ccflags" << "@buildinfo_ccflags@" << "cflags" << "@buildinfo_cflags@" << "cxx" << "@buildinfo_cxx_version@" |