I read the thread ( http://lists.llvm.org/pipermail/llvm-dev/2016-February/096115.html ). I think the wonderful feature of the MinGW/Cygwin ld is the option --enable-auto-import. The option is limited to COFF, but LINK.exe doesn't have it. Could we add the feature to lld-link ? If it is possible, many people will change the coding pattern for using DLL. -- no more if-def declspec(dllimport) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160318/b9537b22/attachment.html>
On Fri, Mar 18, 2016 at 8:50 AM, Sangjin Han via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I read the thread ( > http://lists.llvm.org/pipermail/llvm-dev/2016-February/096115.html ). > I think the wonderful feature of the MinGW/Cygwin ld is the option > --enable-auto-import. > The option is limited to COFF, but LINK.exe doesn't have it. > Could we add the feature to lld-link ? > If it is possible, many people will change the coding pattern for using > DLL. -- no more if-def declspec(dllimport) >Technically we can add the feature, but I'm skeptical if it's worth the cost associated with it. Also, if you rely on that feature, then your program is no longer linkable with the MSVC linker, so I'd expect that most people would continue using declspec(dllimport) anyways. That means the feature wouldn't be used often. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160318/3b058aa1/attachment.html>
On Fri, Mar 18, 2016 at 2:42 AM, Rui Ueyama via llvm-dev < llvm-dev at lists.llvm.org> wrote:> > Technically we can add the feature, but I'm skeptical if it's worth the > cost associated with it. Also, if you rely on that feature, then your > program is no longer linkable with the MSVC linker, so I'd expect that most > people would continue using declspec(dllimport) anyways. That means the > feature wouldn't be used often. >Auto-imports seem like a really useful tool for porting Unix-y code to Windows. Before we go there, though, we really need a GNU-style command line syntax for LLD. Doing auto-imports kind of puts the cart before the horse. I continue to think supporting the GNU syntax is a good idea. Martell posted some patches for mignw a while back, but Rui felt they were too invasive. I don't know what the right design is, but I'm sure with some effort we could find the right balance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160318/9d51ab44/attachment.html>
Apparently Analagous Threads
- [LLVMdev] Feedback required on proper dllexport/import implementation
- [LLVMdev] Feedback required on proper dllexport/import implementation
- Building Rgui.exe with Visual Studio
- [LLVMdev] LLVM 3.6: problems building on Windows using MSVC 2013
- [LLVMdev] Feedback required on proper dllexport/import implementation