]> git.tdb.fi Git - builder.git/blobdiff - source/buildinfo.h
Add a list of symbols to keep in the binary to BuildInfo
[builder.git] / source / buildinfo.h
index e0929e7b1da9c8c9eec8bef0fd60e298697d8f55..1bba8195bc536014270ba8eff7664d31e63e7069 100644 (file)
@@ -4,7 +4,7 @@
 #include <list>
 #include <string>
 #include <msp/datafile/objectloader.h>
-#include "misc.h"
+#include <msp/fs/path.h>
 
 /**
 Stores information about compiler command line parameters in a more abstract
@@ -28,8 +28,13 @@ public:
        private:
                void incpath(const std::string &);
                void define(const std::string &, const std::string &);
+               void keep_symbol(const std::string &);
+               void libmode_for_lib(const std::string &, LibraryMode);
                void libpath(const std::string &);
                void library(const std::string &);
+               void local_incpath(const std::string &);
+               void standard(Msp::DataFile::Symbol, const std::string &);
+               void sysroot(const std::string &);
        };
        
        enum UpdateLevel
@@ -68,12 +73,19 @@ public:
        typedef std::map<std::string, std::string> DefineMap;
        typedef std::list<Msp::FS::Path> PathList;
        typedef std::list<std::string> WordList;
+       typedef std::map<std::string, LibraryMode> LibModeMap;
+       typedef std::map<std::string, std::string> StandardMap;
 
+       Tracked<Msp::FS::Path> sysroot;
        DefineMap defines;
        PathList incpath;
+       PathList local_incpath;
        PathList libpath;
        WordList libs;
        Tracked<LibraryMode> libmode;
+       LibModeMap libmodes;
+       WordList keep_symbols;
+       StandardMap standards;
        Tracked<bool> threads;
        Tracked<bool> debug;
        Tracked<int> optimize;
@@ -83,6 +95,11 @@ public:
 
        BuildInfo();
 
+       /** Returns the library mode for linking a particular library.  If no mode
+       has been specified for that library, the the global library mode is
+       returned. */
+       LibraryMode get_libmode_for(const std::string &) const;
+
        /** Updates the BuildInfo from another one.  Lists are concatenated, with
        the first occurrence of each item preserved.  Scalars are overwritten.