[PATCH] D142888: [compiler-rt] Fix building GWPASAN on ARM

Leandro Lupori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 10:22:47 PST 2023


luporl added a comment.

In D142888#4093468 <https://reviews.llvm.org/D142888#4093468>, @luporl wrote:

> There is just one thing that is still not clear to me: if there's no explicit dependency of Scudo or GWP-Asan on libunwind, wouldn't it be possible for libunwind to not have finished building when Scudo is being linked, causing a link error?

I guess I found the answer.
Adding `$<TARGET_LINKER_FILE:$<IF:$<TARGET_EXISTS:unwind_shared>,unwind_shared,unwind_static>>`  to `SCUDO_LINK_LIBS` also adds an implicit dependency to libunwind on `build.ninja`.

BTW, the previous Scudo fix doesn't work with this CMake config because `COMPILER_RT_USE_LLVM_UNWINDER` ends up being off, which results in an empty `COMPILER_RT_UNWINDER_LINK_LIBS`.

And indeed, removing `--unwindlib=none` was making the linker use `-lgcc_s`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142888



More information about the llvm-commits mailing list