[PATCH] D108095: [profile] Don't use pragma comment linker on mingw

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 01:18:17 PDT 2021


mstorsjo added a comment.

In D108095#2946115 <https://reviews.llvm.org/D108095#2946115>, @nikic wrote:

> In D108095#2945822 <https://reviews.llvm.org/D108095#2945822>, @mstorsjo wrote:
>
>> Btw, to understand your setup - you're building compiler-rt/profile as part of building clang, via e.g. `LLVM_ENABLE_PROJECTS` (so it ends up being built with the existing host compiler, GCC) but then compile code using the clang and using the newly built compiler-rt/profile library with the newly built clang?
>
> We're compiling the profile runtime for use with rustc. The runtime gets compiled using the host compiler and then linked with programs built by rustc with the newly built LLVM. Clang is never built.

Ah, right, that's even clearer. Thanks!

> In D108095#2945825 <https://reviews.llvm.org/D108095#2945825>, @mstorsjo wrote:
>
>> Sorry, I’m a bit slow today: I presume the situation is that this setup used to work fine, when doing profiled builds with clang, when linking with ld.bfd - but now it no longer does. But sanitizers have always required that they (the compiler-rt code) are built with clang (e.g. with LLVM_ENABLE_RUNTIMES, or entirely manually/separately) and linked with lld.
>
> Is that a mingw-specific requirement? I don't think sanitizers for other platforms need to be be built with clang or linked with lld. We don't support sanitizers on mingw right now, so we may not have run into that issue.

Yes, that's a mingw specific requirement. The sanitizers on windows are fairly new and only working in that minimal configuration (built with clang, linked with lld - or in full MSVC/clang-cl environments, where they can be linked with MS link.exe too).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108095



More information about the llvm-commits mailing list