X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucompiler.cpp;h=884776ab21927540885c03db4b135601889ca0a3;hb=69cd5cc73f466181420711fb907979de58687a4c;hp=6daa99d81a565c482c05f6a49127986d0a457ead;hpb=081e13e6f146d1685bdcb1ec1c82752f4c6d264d;p=builder.git diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 6daa99d..884776a 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -92,7 +92,6 @@ void GnuCompiler::do_prepare() Task *GnuCompiler::run(const Target &target) const { const ObjectFile &object = dynamic_cast(target); - const Component &comp = *object.get_component(); ExternalTask::Arguments argv; argv.push_back(executable->get_path().str()); @@ -136,7 +135,10 @@ Task *GnuCompiler::run(const Target &target) const argv.push_back("-Winline"); } if(binfo.fatal_warnings) + { argv.push_back("-Werror"); + argv.push_back("-Wno-error=deprecated-declarations"); + } } const FS::Path &sysroot = binfo.sysroot; @@ -190,7 +192,7 @@ Task *GnuCompiler::run(const Target &target) const FS::Path obj_path = object.get_path(); FS::Path src_path = object.get_source().get_path(); - FS::Path work_dir = comp.get_package().get_source_directory(); + FS::Path work_dir = object.get_component()->get_package().get_source_directory(); argv.push_back("-o"); argv.push_back(relative(obj_path, work_dir).str());