unwind: allow building with GCC
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 13 Jun 2021 21:28:43 +0000 (14:28 -0700)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 13 Jun 2021 21:44:54 +0000 (14:44 -0700)
commite03be2efe564026ad3b04d459794c89c674e1ed9
treef68d18b3103cdb08ec7ca4b3731dae3c30467f81
parent562593ff82f89961c2fb9cf89eb9524ec51425e9
unwind: allow building with GCC

This was regressed in adf1561d6ce8.  Since gcc does not support
`__has_feature`, this adjusts the build to use the
`__SANITIZE_ADDRESS__` macro which GCC defines to identify if ASAN is
enabled (similar to `__has_feature`).  This allows building libunwind
with gcc again.

Patch by Daniel Levin!

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D104176
libunwind/src/libunwind.cpp