Skip to content

Commit

Permalink
[compiler-rt] Disable QSORT interception on watchOS and tvOS.
Browse files Browse the repository at this point in the history
Building the sanitizers for watchOS currently fails with
    sanitizer_common_interceptors.inc:9656:8: error: thread-local storage is not supported for the current target
    static THREADLOCAL SIZE_T qsort_size;

I've also speculatively disabled QSORT interception for tvOS to unblock
failing builds. I'll ask someone with more sanitizer knowledge to check
after the holidays.
  • Loading branch information
fhahn committed Dec 26, 2019
1 parent b036f55 commit 54c5224
Showing 1 changed file with 14 additions and 1 deletion.
Expand Up @@ -96,6 +96,18 @@
# define SI_IOSSIM 0
#endif

#if SANITIZER_WATCHOS
# define SI_WATCHOS 1
#else
# define SI_WATCHOS 0
#endif

#if SANITIZER_TVOS
# define SI_TVOS 1
#else
# define SI_TVOS 0
#endif

#if SANITIZER_FUCHSIA
# define SI_NOT_FUCHSIA 0
#else
Expand Down Expand Up @@ -581,7 +593,8 @@
#define SANITIZER_INTERCEPT_ATEXIT SI_NETBSD
#define SANITIZER_INTERCEPT_PTHREAD_ATFORK SI_NETBSD
#define SANITIZER_INTERCEPT_GETENTROPY SI_FREEBSD
#define SANITIZER_INTERCEPT_QSORT (SI_POSIX && !SI_IOSSIM)
#define SANITIZER_INTERCEPT_QSORT \
(SI_POSIX && !SI_IOSSIM && !SI_WATCHOS && !SI_TVOS)
#define SANITIZER_INTERCEPT_QSORT_R (SI_LINUX && !SI_ANDROID)

#endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H

0 comments on commit 54c5224

Please sign in to comment.