Hi,

Kai and I discussed this previously but I would like to present to everyone
a tool to generate import libs based on layout and code structure of gendef.

I would like propose
https://github.com/martell/genlib
to be merged as part of the mingw-w64 project.

There are a couple of advantages over using this to dlltool.

1. This tool supports the following targets armv7 aarch64 i686 and x86_64.
    where as dlltool currently supports just i686 and x86_64
    (and a really old arm target thats not NT)

2. The target is specified at runtime so one build will do for all targets.
    (this will be especially useful for cross compiling)

3. This tool unlike dlltool complies to the PE/COFF spec 7.
    Import Library Format. so that we can interop with other linkers
besides ld.

The 2 most common use cases would be

1. Using llvm's linker lld which is now feature complete for COFF on arm
x86 and x64.
2. Generate an import lib for msvc to use which dlltool could not do.

I'm sure some have noticed but I have added support for building the
mingw-w64 crt with clang over the last few months.
With this mingw-w64 becomes linker independant and can be compiled with
either gcc or clang and is not bound to ld anymore.

I would like to propose we initially have a flag to enable using this when
building the crt. Some of the autotools experts here may know some more on
that. This is because currently ld does not support PE/COFF spec 7 and does
not understand the resulting library.

Ideally it would be great if the maintainers of ld could comply with
PE/COFF spec 7. Import Library Format.
Maybe someone could cc the windows ld maintainer on this?

The code much like the other mingw-w64-tools like gendef is not the
cleanest but I am open to changes and review of course. I have left notes
in the source for things that should be added and how we might refactor it.
Feel free to hammer me on this btw. :)

As for the reason this was created.
Quite simply it was for the vlc media player to migrate to clang from msvc
or gcc adding support for the armv7 target. So the videolan  were the
sponsors of this work

Hoping to hear from everyone
Martell
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to