]> git.tdb.fi Git - builder.git/blobdiff - source/link.cpp
Add Id tag to all files
[builder.git] / source / link.cpp
index 0d94e5ab62251c14c4a49ffea687cfb3ab3d3077..30fecfba29e49eac2fad7037bfd075a9deb618eb 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of builder
+Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #include <msp/path/utils.h>
 #include "builder.h"
 #include "component.h"
@@ -19,11 +26,11 @@ Link::Link(Builder &b, const Executable &exe):
        const Component &comp=exe.get_component();
 
        //XXX Determine whether to use g++ or gcc
-       argv.push_back("g++");
+       argv.push_back(builder.get_tool("LDXX", exe.get_package()->get_arch()));
        
-       if(comp.get_type()==Component::LIBRARY)
+       if(comp.get_type()==Component::LIBRARY || comp.get_type()==Component::MODULE)
                argv.push_back("-shared");
-       else if(comp.get_package().get_config().get_option("staticlibs").value=="all")
+       else if(comp.get_package().get_library_mode()==ALL_STATIC)
                argv.push_back("-static");
 
        const BuildInfo &binfo=comp.get_build_info();