[PATCH] D58651: [NFC][Sanitizer] Pull up GetStackTrace into sanitizer_common

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 09:40:24 PST 2019


rnk added a comment.

In D58651#1413884 <https://reviews.llvm.org/D58651#1413884>, @yln wrote:

> Is there a way to emulate weak linkage on windows?
>  Can you offer guidance on how to resolve this?


You have activated the sanitizer trap card, attempting to use weak functions in portable code. You can achieve the same affect with weak aliases, `#pragma comment(linker, "/alternatename:foo=foo_default")`, but it is not directly functionally equivalent to weak functions. If you search around for that pragma you should be able to find the code pattern you need.

I wish the sanitizers would use fewer weak functions so that we didn't experience this pain every time a new one is introduced.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58651





More information about the llvm-commits mailing list