[PATCH] D65572: Fix static linking failure with --unwindlib=libunwind
Khem Raj via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 4 12:15:30 PDT 2019
raj.khem added a comment.
In D65572#1614003 <https://reviews.llvm.org/D65572#1614003>, @compnerd wrote:
> `-ldl` doesn't work on all platforms (e.g. android, FreeBSD, etc). `-lpthread` is wrong - if you want to add that, I think that we need to improve the `-thread-model` flag in clang first (it currently just always passes `posix`, which is ignored; but would identify the threading model). `-lpthread` is wrong - consider building on Solaris with Solaris threads rather than POSIX threads, or on Windows with the Win32 threading. This really is inline with the work that needs to be finished up with having library link dependencies for static libraries (i.e. `#pragma comment(lib, …)`).
we are assuming llvm libunwind to have no other dependencies, but thats not the case atleast not on linux, I understand this code is in common area and will impact all, maybe this should be moved to toolchain specific argument processing, where we can then override it specifically for linux environment.
CHANGES SINCE LAST ACTION
More information about the cfe-commits