[PATCH] Working on reconciling out-of-tree patches to compiler-rt for building for iOS.

Justin Bogner mail at justinbogner.com
Fri Jun 19 17:04:24 PDT 2015


Chris Bieneman <beanz at apple.com> writes:
> This is one of many changes needed for compiler-rt to get it building on iOS.
>
> This change ifdefs out headers and functionality that aren't available on iOS.
>
> Note: this change does not enable building for iOS, as there are more
> changes to come.

LGTM.

> http://reviews.llvm.org/D10514
>
> Files:
>   lib/sanitizer_common/sanitizer_platform.h
>   lib/sanitizer_common/sanitizer_platform_limits_posix.cc
>
> Index: lib/sanitizer_common/sanitizer_platform.h
> ===================================================================
> --- lib/sanitizer_common/sanitizer_platform.h
> +++ lib/sanitizer_common/sanitizer_platform.h
> @@ -38,6 +38,11 @@
>  # else
>  #  define SANITIZER_IOS    0
>  # endif
> +# if TARGET_IPHONE_SIMULATOR
> +#  define SANITIZER_IOSSIM 1
> +# else
> +#  define SANITIZER_IOSSIM 0
> +# endif
>  #else
>  # define SANITIZER_MAC     0
>  # define SANITIZER_IOS     0
> Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> ===================================================================
> --- lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> +++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> @@ -34,8 +34,6 @@
>  #include <grp.h>
>  #include <limits.h>
>  #include <net/if.h>
> -#include <net/if_arp.h>
> -#include <net/route.h>
>  #include <netdb.h>
>  #include <poll.h>
>  #include <pthread.h>
> @@ -54,6 +52,11 @@
>  #include <time.h>
>  #include <wchar.h>
>  
> +#if !SANITIZER_IOS
> +#include <net/if_arp.h>
> +#include <net/route.h>
> +#endif
> +
>  #if !SANITIZER_ANDROID
>  #include <sys/mount.h>
>  #include <sys/timeb.h>
> @@ -337,7 +340,9 @@
>    unsigned path_max = PATH_MAX;
>  
>    // ioctl arguments
> +#if !SANITIZER_IOS
>    unsigned struct_arpreq_sz = sizeof(struct arpreq);
> +#endif
>    unsigned struct_ifreq_sz = sizeof(struct ifreq);
>    unsigned struct_termios_sz = sizeof(struct termios);
>    unsigned struct_winsize_sz = sizeof(struct winsize);
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
> Index: lib/sanitizer_common/sanitizer_platform.h
> ===================================================================
> --- lib/sanitizer_common/sanitizer_platform.h
> +++ lib/sanitizer_common/sanitizer_platform.h
> @@ -38,6 +38,11 @@
>  # else
>  #  define SANITIZER_IOS    0
>  # endif
> +# if TARGET_IPHONE_SIMULATOR
> +#  define SANITIZER_IOSSIM 1
> +# else
> +#  define SANITIZER_IOSSIM 0
> +# endif
>  #else
>  # define SANITIZER_MAC     0
>  # define SANITIZER_IOS     0
> Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> ===================================================================
> --- lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> +++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> @@ -34,8 +34,6 @@
>  #include <grp.h>
>  #include <limits.h>
>  #include <net/if.h>
> -#include <net/if_arp.h>
> -#include <net/route.h>
>  #include <netdb.h>
>  #include <poll.h>
>  #include <pthread.h>
> @@ -54,6 +52,11 @@
>  #include <time.h>
>  #include <wchar.h>
>  
> +#if !SANITIZER_IOS
> +#include <net/if_arp.h>
> +#include <net/route.h>
> +#endif
> +
>  #if !SANITIZER_ANDROID
>  #include <sys/mount.h>
>  #include <sys/timeb.h>
> @@ -337,7 +340,9 @@
>    unsigned path_max = PATH_MAX;
>  
>    // ioctl arguments
> +#if !SANITIZER_IOS
>    unsigned struct_arpreq_sz = sizeof(struct arpreq);
> +#endif
>    unsigned struct_ifreq_sz = sizeof(struct ifreq);
>    unsigned struct_termios_sz = sizeof(struct termios);
>    unsigned struct_winsize_sz = sizeof(struct winsize);
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list