]> git.tdb.fi Git - builder.git/commitdiff
Don't use a versioned name for import libraries
authorMikko Rasa <tdb@tdb.fi>
Mon, 2 Jan 2023 20:30:59 +0000 (22:30 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 2 Jan 2023 22:51:47 +0000 (00:51 +0200)
Windows doesn't have symlinks so the import library would not be found.
In fact, the import library is kind of like an soname symlink.

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

index f0128005c67cc12b985206105d69a1c1a391fa9d..8d5721bc38ea3b34a88e65656967f260c503428e 100644 (file)
@@ -44,21 +44,6 @@ Target *MingwDllTool::create_target(const vector<Target *> &sources, const strin
        return imp;
 }
 
-Target *MingwDllTool::create_install(Target &target) const
-{
-       if(ImportLibrary *imp = dynamic_cast<ImportLibrary *>(&target))
-       {
-               Tool &copy = builder.get_toolchain().get_tool("CP");
-               InstalledFile *inst_tgt = dynamic_cast<InstalledFile *>(copy.create_target(target));
-               string link_name = format("lib%s.dll.a", imp->get_shared_library()->get_libname());
-               if(link_name!=FS::basename(inst_tgt->get_path()))
-                       inst_tgt->set_symlink(link_name);
-               return inst_tgt;
-       }
-       else
-               return 0;
-}
-
 Task *MingwDllTool::_run(const Target &target)
 {
        const Tool &tool = *target.get_tool();
index d35fa19aaf919d5c5490f0b8a064ce56c3cdb1e6..d13d1a7b44b6aa39a23fefdfcdc173f0918859fd 100644 (file)
@@ -9,7 +9,6 @@ public:
        MingwDllTool(Builder &, const Architecture &);
 
        Target *create_target(const std::vector<Target *> &, const std::string &) override;
-       Target *create_install(Target &) const override;
 
 private:
        static Task *_run(const Target &);
index 190b079c1a05b3e23c32f79f306eb2aa41b076c2..8fa42f70f8a0f4108ea1f93befac372628027fe7 100644 (file)
@@ -18,13 +18,6 @@ ImportLibrary::ImportLibrary(Builder &b, const Component &c, SharedLibrary &sl):
        shared_lib->set_import_library(this);
 
        install_location = "lib";
-
-       const string &version = component->get_package().get_interface_version();
-       if(!version.empty())
-       {
-               const Architecture &arch = builder.get_current_arch();
-               install_filename = arch.create_filename<ImportLibrary>(format("%s-%s", sl.get_libname(), version));
-       }
 }
 
 string ImportLibrary::generate_filename(const Component &comp, const SharedLibrary &sl)