From: Mikko Rasa Date: Mon, 2 Jan 2023 10:33:19 +0000 (+0200) Subject: Remove ExportDefinitions from ImportLibrary's constructor X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e64433e6b1cf01fdfcf8e468e735c090a957253b;p=builder.git Remove ExportDefinitions from ImportLibrary's constructor It's not necessary with the MSVC toolchain. --- diff --git a/plugins/gnu/mingwdlltool.cpp b/plugins/gnu/mingwdlltool.cpp index c5ffdf5..e93edc3 100644 --- a/plugins/gnu/mingwdlltool.cpp +++ b/plugins/gnu/mingwdlltool.cpp @@ -37,7 +37,8 @@ Target *MingwDllTool::create_target(const vector &sources, const strin ExportDefinitions *exp = new ExportDefinitions(builder, *shlib.get_component(), objs); exp->set_tool(*this); - ImportLibrary *imp = new ImportLibrary(builder, *shlib.get_component(), shlib, *exp); + ImportLibrary *imp = new ImportLibrary(builder, *shlib.get_component(), shlib); + imp->add_dependency(*exp); imp->set_tool(*this); return imp; diff --git a/source/lib/importlibrary.cpp b/source/lib/importlibrary.cpp index 435fb30..190b079 100644 --- a/source/lib/importlibrary.cpp +++ b/source/lib/importlibrary.cpp @@ -10,12 +10,11 @@ using namespace std; using namespace Msp; -ImportLibrary::ImportLibrary(Builder &b, const Component &c, SharedLibrary &sl, ExportDefinitions &exp): +ImportLibrary::ImportLibrary(Builder &b, const Component &c, SharedLibrary &sl): FileTarget(b, c.get_package(), c.get_package().get_output_directory()/generate_filename(c, sl)), shared_lib(&sl) { component = &c; - add_dependency(exp); shared_lib->set_import_library(this); install_location = "lib"; diff --git a/source/lib/importlibrary.h b/source/lib/importlibrary.h index 1c5d682..ac2de26 100644 --- a/source/lib/importlibrary.h +++ b/source/lib/importlibrary.h @@ -17,7 +17,7 @@ private: public: ImportLibrary(Builder &b, const Msp::FS::Path &p): FileTarget(b, p) { } - ImportLibrary(Builder &, const Component &, SharedLibrary &, ExportDefinitions &); + ImportLibrary(Builder &, const Component &, SharedLibrary &); private: static std::string generate_filename(const Component &, const SharedLibrary &);