Skip to content

[CMake] Remove HAVE_LINK_H #104893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion llvm/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ endif()
check_include_file(dlfcn.h HAVE_DLFCN_H)
check_include_file(errno.h HAVE_ERRNO_H)
check_include_file(fcntl.h HAVE_FCNTL_H)
check_include_file(link.h HAVE_LINK_H)
check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H)
if( NOT PURE_WINDOWS )
check_include_file(pthread.h HAVE_PTHREAD_H)
Expand Down
3 changes: 0 additions & 3 deletions llvm/include/llvm/Config/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@
/* Define to 1 if you have the `pthread_setname_np' function. */
#cmakedefine HAVE_PTHREAD_SETNAME_NP ${HAVE_PTHREAD_SETNAME_NP}

/* Define to 1 if you have the <link.h> header file. */
#cmakedefine HAVE_LINK_H ${HAVE_LINK_H}

/* Define to 1 if you have the <mach/mach.h> header file. */
#cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Support/Unix/Signals.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
#if HAVE_LINK_H
#if __has_include(<link.h>)
#include <link.h>
#endif
#ifdef HAVE__UNWIND_BACKTRACE
Expand Down Expand Up @@ -464,7 +464,7 @@ void llvm::sys::AddSignalHandler(sys::SignalHandlerCallback FnPtr,
RegisterHandlers();
}

#if ENABLE_BACKTRACES && defined(HAVE_BACKTRACE) && HAVE_LINK_H && \
#if ENABLE_BACKTRACES && defined(HAVE_BACKTRACE) && \
(defined(__linux__) || defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || defined(__NetBSD__))
struct DlIteratePhdrData {
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/Support/SignalsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using testing::Not;
// %i in the Symbolizer Markup Format spec
#define I_REGEX "(0x[0-9a-fA-F]+|0[0-7]+|[0-9]+)"

#if defined(HAVE_BACKTRACE) && ENABLE_BACKTRACES && HAVE_LINK_H && \
#if defined(HAVE_BACKTRACE) && ENABLE_BACKTRACES && \
(defined(__linux__) || defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || defined(__NetBSD__))
TEST(SignalsTest, PrintsSymbolizerMarkup) {
Expand Down
2 changes: 0 additions & 2 deletions llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ write_cmake_config("config") {
if (current_os == "linux" || current_os == "android") {
values += [
"HAVE_FUTIMENS=1",
"HAVE_LINK_H=1",
"HAVE_MALLINFO=1",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1",
]
} else {
values += [
"HAVE_FUTIMENS=",
"HAVE_LINK_H=",
"HAVE_MALLINFO=",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=",
]
Expand Down
1 change: 0 additions & 1 deletion utils/bazel/llvm-project-overlay/llvm/config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ posix_defines = [

linux_defines = posix_defines + [
"_GNU_SOURCE",
"HAVE_LINK_H=1",
"HAVE_MALLINFO=1",
"HAVE_SBRK=1",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@
/* Define to 1 if you have the `pthread_setname_np' function. */
#define HAVE_PTHREAD_SETNAME_NP 1

/* Define to 1 if you have the <link.h> header file. */
/* HAVE_LINK_H defined in Bazel */

/* Define to 1 if you have the <mach/mach.h> header file. */
/* HAVE_MACH_MACH_H defined in Bazel */

Expand Down
3 changes: 0 additions & 3 deletions utils/bazel/llvm_configs/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@
/* Define to 1 if you have the `pthread_setname_np' function. */
#cmakedefine HAVE_PTHREAD_SETNAME_NP ${HAVE_PTHREAD_SETNAME_NP}

/* Define to 1 if you have the <link.h> header file. */
#cmakedefine HAVE_LINK_H ${HAVE_LINK_H}

/* Define to 1 if you have the <mach/mach.h> header file. */
#cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}

Expand Down
Loading