From dee470bf63c25c3d99ea89e9d9f5979ab01d53bb Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Sun, 18 Oct 2009 16:09:51 -0700 Subject: Add compilation information to Version namespace The Version namespace now provides the compiler which was used, the OS, machine type and processor type the compilation was done on, and the CFLAGS, CFLAGS_L and LDFLAGS which were used. If GCC was the compiler, it also provides the compiler version. This information is included in crash reports, and can be dumped using the new command line option "-version". --- crawl-ref/source/version.h | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'crawl-ref/source/version.h') diff --git a/crawl-ref/source/version.h b/crawl-ref/source/version.h index 8b8341b2a3..660b38ff92 100644 --- a/crawl-ref/source/version.h +++ b/crawl-ref/source/version.h @@ -85,6 +85,53 @@ namespace Version * will return the alpha/beta/rc number. Otherwise, this returns 0. */ int ReleaseID(); + + //! The compiler used. + /*! + * Names the compiler used to genrate the executable. + */ + std::string Compiler(); + + //! The operating system. + /*! + * Names the operating system that the executable was compiled on. + */ + std::string BuildOS(); + + //! The machine type. + /*! + * Names the machine type (e.g., "i686") the executable was compiled on. + */ + std::string BuildMachine(); + + //! The processor type. + /*! + * Names the processor type the executable was compiled on. + */ + std::string BuildProcessor(); + + //! The CFLAGS. + /*! + * Returns the CFLAGS the executable was compiled with. + */ + std::string CFLAGS(); + + //! The CFLAGS_L. + /*! + * Returns the CFLAGS_L the executable was compiled with. + */ + std::string CFLAGS_L(); + + //! The LDFLAGS. + /*! + * Returns the flags the executable was linked with. + */ + std::string LDFLAGS(); } +/* *********************************************************************** + * called from: initfile debug + * *********************************************************************** */ +std::string compilation_info(); + #endif -- cgit v1.2.3-54-g00ecf