From e9d2021768806bee648274ec6ba3f8cac9a21db7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 2 Jan 2023 22:30:59 +0200 Subject: [PATCH] Don't use a versioned name for import libraries 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 | 15 --------------- plugins/gnu/mingwdlltool.h | 1 - source/lib/importlibrary.cpp | 7 ------- 3 files changed, 23 deletions(-) diff --git a/plugins/gnu/mingwdlltool.cpp b/plugins/gnu/mingwdlltool.cpp index f012800..8d5721b 100644 --- a/plugins/gnu/mingwdlltool.cpp +++ b/plugins/gnu/mingwdlltool.cpp @@ -44,21 +44,6 @@ Target *MingwDllTool::create_target(const vector &sources, const strin return imp; } -Target *MingwDllTool::create_install(Target &target) const -{ - if(ImportLibrary *imp = dynamic_cast(&target)) - { - Tool © = builder.get_toolchain().get_tool("CP"); - InstalledFile *inst_tgt = dynamic_cast(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(); diff --git a/plugins/gnu/mingwdlltool.h b/plugins/gnu/mingwdlltool.h index d35fa19..d13d1a7 100644 --- a/plugins/gnu/mingwdlltool.h +++ b/plugins/gnu/mingwdlltool.h @@ -9,7 +9,6 @@ public: MingwDllTool(Builder &, const Architecture &); Target *create_target(const std::vector &, const std::string &) override; - Target *create_install(Target &) const override; private: static Task *_run(const Target &); diff --git a/source/lib/importlibrary.cpp b/source/lib/importlibrary.cpp index 190b079..8fa42f7 100644 --- a/source/lib/importlibrary.cpp +++ b/source/lib/importlibrary.cpp @@ -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(format("%s-%s", sl.get_libname(), version)); - } } string ImportLibrary::generate_filename(const Component &comp, const SharedLibrary &sl) -- 2.43.0