[PATCH] D89004: [LLD] [COFF] Implement a GNU/ELF like -wrap option

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 13:25:32 PDT 2020


mstorsjo added a comment.

In D89004#2332496 <https://reviews.llvm.org/D89004#2332496>, @orgads wrote:

> Thank you very much!
>
> Can you please send me a static 64-bit build like you did in the old days? ;)
>
> If you can give me instructions how to build it that would be even better :)

I primarily cross compile things, so to build it, I'd do something equivalent to this, on linux:

- Check out https://github.com/mstorsjo/llvm-mingw
- Build a cross toolchain using `./build-all.sh ~/llvm-mingw-latest`
- Using the newly built cross toolchain, cross compile LLVM and the rest of the toolchain to run on windows, `./build-cross-tools.sh ~/llvm-mingw-latest ~/llvm-mingw-latest-x86_64 x86_64`

If you want the toolchain not to use a dynamically linked libc++, you can either add `--disable-shared` in `build-all.sh` on the `./build-libcxx.sh` line before the second step, or delete the libc++.dll.a and libunwind.dll.a files from the built toolchain after the second step.

If you've only got access to building things on MSYS, the same steps should mostly apply still. If you just run the first step, you'll end up with a working LLD, but it's linked against libstdc++ and winpthreads - and some people report issues still with the LLD threading and winpthreads. So on MSYS, the second step would rebuild all of the tools using the newly built tools, so you have an LLD linked against libc++.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89004/new/

https://reviews.llvm.org/D89004



More information about the llvm-commits mailing list