From 7783e94c216643495992acdf24439f4a2e8d59db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Fri, 14 Oct 2022 13:17:52 +0200 Subject: [PATCH 1/2] NativeAOT: remove some headers that are not needed --- .../nativeaot/Runtime/unix/PalRedhawkUnix.cpp | 20 ------------------- .../nativeaot/Runtime/unix/config.h.in | 3 --- .../nativeaot/Runtime/unix/configure.cmake | 3 --- 3 files changed, 26 deletions(-) diff --git a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp index ce7cf86ee7f8d7..83c11750927de1 100644 --- a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp +++ b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkUnix.cpp @@ -48,26 +48,6 @@ #include #endif -#if HAVE_SYS_VMPARAM_H -#include -#endif // HAVE_SYS_VMPARAM_H - -#if HAVE_MACH_VM_TYPES_H -#include -#endif // HAVE_MACH_VM_TYPES_H - -#if HAVE_MACH_VM_PARAM_H -#include -#endif // HAVE_MACH_VM_PARAM_H - -#ifdef __APPLE__ -#include -#include -#include -#include -#include -#endif // __APPLE__ - #if HAVE_CLOCK_GETTIME_NSEC_NP #include #endif diff --git a/src/coreclr/nativeaot/Runtime/unix/config.h.in b/src/coreclr/nativeaot/Runtime/unix/config.h.in index 5ae3735d9bd2c5..803271899087d9 100644 --- a/src/coreclr/nativeaot/Runtime/unix/config.h.in +++ b/src/coreclr/nativeaot/Runtime/unix/config.h.in @@ -1,9 +1,6 @@ #ifndef _PAL_CONFIG_H_INCLUDED #define _PAL_CONFIG_H_INCLUDED 1 -#cmakedefine01 HAVE_SYS_VMPARAM_H -#cmakedefine01 HAVE_MACH_VM_TYPES_H -#cmakedefine01 HAVE_MACH_VM_PARAM_H #cmakedefine01 HAVE_AUXV_HWCAP_H #cmakedefine01 HAVE_PTHREAD_ATTR_GET_NP diff --git a/src/coreclr/nativeaot/Runtime/unix/configure.cmake b/src/coreclr/nativeaot/Runtime/unix/configure.cmake index d93449c794021e..d37baf7a017560 100644 --- a/src/coreclr/nativeaot/Runtime/unix/configure.cmake +++ b/src/coreclr/nativeaot/Runtime/unix/configure.cmake @@ -15,9 +15,6 @@ endif() list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_FILE_OFFSET_BITS=64) -check_include_files(sys/vmparam.h HAVE_SYS_VMPARAM_H) -check_include_files(mach/vm_types.h HAVE_MACH_VM_TYPES_H) -check_include_files(mach/vm_param.h HAVE_MACH_VM_PARAM_H) check_include_files("sys/auxv.h;asm/hwcap.h" HAVE_AUXV_HWCAP_H) check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD) From c61f3a6c3e3209c01c29655515144130ac01e3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Sun, 16 Oct 2022 10:50:00 +0200 Subject: [PATCH 2/2] Remove HAVE_UCONTEXT_T too --- src/coreclr/nativeaot/Runtime/unix/config.h.in | 1 - src/coreclr/nativeaot/Runtime/unix/configure.cmake | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/coreclr/nativeaot/Runtime/unix/config.h.in b/src/coreclr/nativeaot/Runtime/unix/config.h.in index 803271899087d9..702922c34ea36f 100644 --- a/src/coreclr/nativeaot/Runtime/unix/config.h.in +++ b/src/coreclr/nativeaot/Runtime/unix/config.h.in @@ -15,7 +15,6 @@ #cmakedefine01 HAVE___GREGSET_T #cmakedefine01 HAVE_SIGINFO_T -#cmakedefine01 HAVE_UCONTEXT_T #cmakedefine01 HAVE_LWP_SELF #cmakedefine01 HAVE_SCHED_GETCPU diff --git a/src/coreclr/nativeaot/Runtime/unix/configure.cmake b/src/coreclr/nativeaot/Runtime/unix/configure.cmake index d37baf7a017560..952fb384acd703 100644 --- a/src/coreclr/nativeaot/Runtime/unix/configure.cmake +++ b/src/coreclr/nativeaot/Runtime/unix/configure.cmake @@ -41,8 +41,6 @@ set(CMAKE_EXTRA_INCLUDE_FILES) set(CMAKE_EXTRA_INCLUDE_FILES signal.h) check_type_size(siginfo_t SIGINFO_T) set(CMAKE_EXTRA_INCLUDE_FILES) -set(CMAKE_EXTRA_INCLUDE_FILES ucontext.h) -check_type_size(ucontext_t UCONTEXT_T) check_cxx_source_compiles(" #include