]> git.tdb.fi Git - builder.git/blobdiff - source/architecture.cpp
Always prepare cmdline to avoid some dependency hassle
[builder.git] / source / architecture.cpp
index 50013e88de7adc955dbb37b10f0ac381edbf65a9..c2e91620de962b3246de8cf4f28434fe3fc53f94 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -11,9 +11,10 @@ Distributed under the LGPL
 using namespace std;
 using namespace Msp;
 
-Architecture::Architecture(Builder &b, const string &n):
+Architecture::Architecture(Builder &b, const string &n, bool a):
        builder(b),
-       name(n)
+       name(n),
+       native(a)
 { }
 
 void Architecture::set_tool(const string &t, const string &p)
@@ -32,10 +33,10 @@ std::string Architecture::get_tool(const string &t) const
                        return i->second;
        }
 
-       if(name!="native")
+       if(!native)
        {
-               const Architecture &native=builder.get_architecture("native");
-               return prefix+"-"+native.get_tool(t);
+               const Architecture &native_arch=builder.get_native_arch();
+               return prefix+"-"+native_arch.get_tool(t);
        }
        else
                throw KeyError("Unknown tool");