From ccead1c6c820970e3ae37992b76f99675852d7f9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 3 Jan 2023 02:15:05 +0200 Subject: [PATCH] Remove automatic export/import of symbols from GNU tools on Windows MSVC can't do this, so I'm finally going to add the necessary decorations to my libraries. --- plugins/gnu/gnulinker.cpp | 3 --- plugins/gnu/mingwdlltool.cpp | 3 --- 2 files changed, 6 deletions(-) diff --git a/plugins/gnu/gnulinker.cpp b/plugins/gnu/gnulinker.cpp index 710c44b..c8e6606 100644 --- a/plugins/gnu/gnulinker.cpp +++ b/plugins/gnu/gnulinker.cpp @@ -316,9 +316,6 @@ ExternalTask::Arguments GnuLinker::_run(const Binary &bin, FS::Path &work_dir) if(i!=binfo.libmodes.end() && i->second<=BuildInfo::STATIC) argv.push_back("-static-libstdc++"); } - - if(arch.get_system()=="windows") - argv.push_back("-Wl,--enable-auto-import"); } return argv; diff --git a/plugins/gnu/mingwdlltool.cpp b/plugins/gnu/mingwdlltool.cpp index 8d5721b..a3fdadb 100644 --- a/plugins/gnu/mingwdlltool.cpp +++ b/plugins/gnu/mingwdlltool.cpp @@ -90,9 +90,6 @@ Task *MingwDllTool::_run(const Target &target) if(ObjectFile *obj = dynamic_cast(d)) argv.push_back(relative(obj->get_path(), work_dir).str()); - // XXX Should use dllexport, but that has some other problems to solve - argv.push_back("--export-all-symbols"); - argv.push_back("-z"); argv.push_back(relative(exp->get_path(), work_dir).str()); } -- 2.45.2