[PATCH] D65572: Fix static linking failure with --unwindlib=libunwind

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 4 11:20:20 PDT 2019


compnerd added a comment.

`-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, …)`).


Repository:
  rC Clang

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

https://reviews.llvm.org/D65572





More information about the cfe-commits mailing list