X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuildinfo.h;h=203ba5fe5bfbc844373f82b5d89c3ed02a16d725;hb=aa053d637e8259755af7d2e4b510a242f4d29c7b;hp=e0ff0bff74ccf15cf0177f2cfee3e04db265d108;hpb=323285f97a1a6fe2628f818371a8b03f233dd036;p=builder.git diff --git a/source/buildinfo.h b/source/buildinfo.h index e0ff0bf..203ba5f 100644 --- a/source/buildinfo.h +++ b/source/buildinfo.h @@ -1,8 +1,8 @@ #ifndef BUILDINFO_H_ #define BUILDINFO_H_ -#include #include +#include #include #include @@ -21,6 +21,13 @@ public: FORCE_DYNAMIC //< Only accept dynamic libraries }; + enum RuntimePathMode + { + NO_RPATH, //< Do not record rpath in binaries + RELATIVE, //< Record relative rpath in binaries + ABSOLUTE //< Record absolute rpath in binaries + }; + class Loader: public Msp::DataFile::ObjectLoader { public: @@ -28,9 +35,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 @@ -40,6 +51,17 @@ public: CHAINED //< Include only compilation options }; + struct LanguageStandard + { + std::string type; + unsigned year; + + LanguageStandard(): year(0) { } + LanguageStandard(const std::string &); + + std::string str() const; + }; + /** A wrapper which tracks the set status of the wrapped variable. A default value may be provided in initialization without causing it to be treated as @@ -51,7 +73,7 @@ public: class Tracked { public: - typedef T LoadType; + using LoadType = T; private: T value; @@ -60,23 +82,24 @@ public: public: Tracked(): value(T()), set(false) { } Tracked(T v): value(v), set(false) { } + Tracked(const Tracked &t): value(t.value), set(t.set) { } Tracked &operator=(const Tracked &v) { if(v.set) { value = v.value; set = true; } return *this; } - Tracked &operator=(T v) { value = v; set = true; return *this; } - operator T() const { return value; } + Tracked &operator=(const T &v) { value = v; set = true; return *this; } + operator const T &() const { return value; } }; - typedef std::map DefineMap; - typedef std::list PathList; - typedef std::list WordList; - typedef std::map LibModeMap; - - DefineMap defines; - PathList incpath; - PathList libpath; - WordList libs; + Tracked sysroot; + std::map defines; + std::vector incpath; + std::vector local_incpath; + std::vector libpath; + std::vector libs; Tracked libmode; - LibModeMap libmodes; + Tracked rpath_mode; + std::map libmodes; + std::vector keep_symbols; + std::map standards; Tracked threads; Tracked debug; Tracked optimize;