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

2021-03-24 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment. @MaskRay how should be proceeed here Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65572/new/ https://reviews.llvm.org/D65572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

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

2019-08-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. If libunwind is configured with `-DLIBUNWIND_ENABLE_THREADS=Off` / it is on Windows / `-DLIBUNWIND_USE_WEAK_PTHREAD=On`, libpthread is not a hard dependency. If you use lld: #if _LIBUNWIND_USE_DLADDR #include #if defined(__unix__) && defined(__ELF__) && defined

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

2019-08-04 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment. In 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 fir

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

2019-08-04 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment. In D65572#1610169 , @rengolin wrote: > This is a tricky one which may vary depending on the libraries available on > different systems. Which toolchain is this? Can you add more context? @rengolin this is when building linux sy

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

2019-08-04 Thread Saleem Abdulrasool via Phabricator via cfe-commits
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 th

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

2019-08-01 Thread Renato Golin via Phabricator via cfe-commits
rengolin added reviewers: compnerd, mstorsjo, jroelofs, theraven. rengolin added a comment. This is a tricky one which may vary depending on the libraries available on different systems. Which toolchain is this? Can you add more context? Repository: rC Clang CHANGES SINCE LAST ACTION https

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

2019-08-01 Thread Khem Raj via Phabricator via cfe-commits
raj.khem created this revision. raj.khem added a reviewer: rengolin. raj.khem added a project: clang. Herald added subscribers: cfe-commits, jfb. when trying to use llvm libunwind via clang driver option --unwindlib and using -static together, linking fails with missing symbols libunwind/src/R