]> git.tdb.fi Git - builder.git/blobdiff - source/architecture.cpp
Split Binary filename generation to Executable and SharedLibrary
[builder.git] / source / architecture.cpp
index 8e618deb4ae9de2c78e3d1ec8e169f829652c8c3..a416551f23312b74febc418f2c4e41b7f9a5049e 100644 (file)
@@ -122,39 +122,11 @@ Architecture::Architecture(Builder &b, const string &spec):
        }
 }
 
-void Architecture::set_tool(const string &t, const string &p)
-{
-       tools[t] = p;
-}
-
 void Architecture::set_cross_prefix(const string &p)
 {
        cross_prefix = p;
 }
 
-std::string Architecture::get_tool(const string &t) const
-{
-       StringMap::const_iterator i = tools.find(t);
-       if(i!=tools.end())
-       {
-               if(i->second[0]=='-')
-                       return cross_prefix+i->second;
-               else
-                       return i->second;
-       }
-
-       const Architecture &native_arch = builder.get_native_arch();
-       if(this!=&native_arch)
-       {
-               if(!cross_prefix.empty())
-                       return cross_prefix+"-"+native_arch.get_tool(t);
-               else
-                       return native_arch.get_tool(t);
-       }
-       else
-               throw invalid_argument("Unknown tool");
-}
-
 bool Architecture::match_name(const string &pattern) const
 {
        vector<string> parts = split(pattern, "-");
@@ -230,10 +202,4 @@ Architecture::Loader::Loader(Architecture &a):
        arch(a)
 {
        add("prefix", &Architecture::cross_prefix);
-       add("tool",   &Loader::tool);
-}
-
-void Architecture::Loader::tool(const string &t, const string &p)
-{
-       arch.tools[t] = p;
 }