]> git.tdb.fi Git - builder.git/blobdiff - source/gnuarchiver.cpp
Allow constructing package-less Executables
[builder.git] / source / gnuarchiver.cpp
index 3f56a2ea4e246e701bd4b18ade03104c4d797f3b..4916408e312607e840cfc9314bc3ee8061b6e760 100644 (file)
@@ -30,7 +30,7 @@ Target *GnuArchiver::create_target(const list<Target *> &sources, const string &
                if(ObjectFile *obj = dynamic_cast<ObjectFile *>(*i))
                        objs.push_back(obj);
                else
-                       throw invalid_argument("GnuLinker::create_target");
+                       throw invalid_argument("GnuArchiver::create_target");
        }
 
        const Component &comp = objs.front()->get_component();
@@ -42,7 +42,7 @@ Target *GnuArchiver::create_target(const list<Target *> &sources, const string &
 Task *GnuArchiver::run(const Target &target) const
 {
        const StaticLibrary &lib = dynamic_cast<const StaticLibrary &>(target);
-       const Component &comp = lib.get_component();
+       const Component &comp = *lib.get_component();
 
        vector<string> argv;
        argv.push_back("ar");