]> git.tdb.fi Git - builder.git/commitdiff
Remove ExportDefinitions from ImportLibrary's constructor
authorMikko Rasa <tdb@tdb.fi>
Mon, 2 Jan 2023 10:33:19 +0000 (12:33 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 2 Jan 2023 22:51:46 +0000 (00:51 +0200)
It's not necessary with the MSVC toolchain.

plugins/gnu/mingwdlltool.cpp
source/lib/importlibrary.cpp
source/lib/importlibrary.h

index c5ffdf5939b9a1b01aeaf88b24a5efd867e055a4..e93edc38b32e5ac2ffcda67e36a40cb7b5d12d2e 100644 (file)
@@ -37,7 +37,8 @@ Target *MingwDllTool::create_target(const vector<Target *> &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;
index 435fb30e50218f9446b48b468791d69e90cc5a17..190b079c1a05b3e23c32f79f306eb2aa41b076c2 100644 (file)
 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";
index 1c5d682a3be001a61fc2003b4485eeec94a94686..ac2de26e327bd77cf28df493cc9fec353f0b9854 100644 (file)
@@ -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 &);