[llvm] [CMake] Remove HAVE_LINK_H (PR #104893)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 22:49:15 PDT 2024
================
@@ -65,7 +65,7 @@
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
-#if HAVE_LINK_H
+#if __has_include(<link.h>)
----------------
s-barannikov wrote:
(nitpicking)
On a second thought, it might be guarded the same way the `dl_iterate_phdr` use is guarded, that is
```
#if ENABLE_BACKTRACES && defined(HAVE_BACKTRACE) && \
(defined(__linux__) || defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || defined(__NetBSD__))
```
This would avoid inclusion of `<link.h>` when unnecessary.
https://github.com/llvm/llvm-project/pull/104893
More information about the llvm-commits
mailing list