summaryrefslogtreecommitdiff
path: root/SDKs
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-11-10 19:38:15 +0000
committerBob Wilson <bob.wilson@apple.com>2014-11-10 19:38:15 +0000
commitf028d70fcadd9b6c4d3ce1dd1af89703e422f6fa (patch)
tree3e3611bec45cfcceac78c0d5cbf728e0eac02c51 /SDKs
parent60927db68941599e8e1bda74e64a1142642f3829 (diff)
Build Darwin libclang_rt libraries against real SDKs.
The minimal fake SDK was very useful in allowing us to build for all Darwin platforms without needing access to the real SDKs, but it did not support building any of the sanitizer runtimes. It's important to fix that. As a consequence, if you don't have the iOS SDKs installed, we will now skip building the iOS-specific libclang_rt libraries. rdar://problem/18825276 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'SDKs')
-rw-r--r--SDKs/darwin/README.txt3
-rw-r--r--SDKs/darwin/usr/include/errno.h17
-rw-r--r--SDKs/darwin/usr/include/fcntl.h17
-rw-r--r--SDKs/darwin/usr/include/inttypes.h86
-rw-r--r--SDKs/darwin/usr/include/limits.h23
-rw-r--r--SDKs/darwin/usr/include/stdio.h90
-rw-r--r--SDKs/darwin/usr/include/stdlib.h32
-rw-r--r--SDKs/darwin/usr/include/string.h52
-rw-r--r--SDKs/darwin/usr/include/sys/errno.h31
-rw-r--r--SDKs/darwin/usr/include/sys/fcntl.h52
-rw-r--r--SDKs/darwin/usr/include/sys/mman.h42
-rw-r--r--SDKs/darwin/usr/include/sys/stat.h25
-rw-r--r--SDKs/darwin/usr/include/sys/types.h20
13 files changed, 0 insertions, 490 deletions
diff --git a/SDKs/darwin/README.txt b/SDKs/darwin/README.txt
deleted file mode 100644
index ea30af358..000000000
--- a/SDKs/darwin/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-The Darwin platforms are all similar enough we roll them into one SDK, and use
-preprocessor tricks to get the right definitions for the few things which
-diverge between OS X and iOS.
diff --git a/SDKs/darwin/usr/include/errno.h b/SDKs/darwin/usr/include/errno.h
deleted file mode 100644
index f06e53713..000000000
--- a/SDKs/darwin/usr/include/errno.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* ===-- errno.h - stub SDK header for compiler-rt --------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#include <sys/errno.h>
diff --git a/SDKs/darwin/usr/include/fcntl.h b/SDKs/darwin/usr/include/fcntl.h
deleted file mode 100644
index a5f91e3a5..000000000
--- a/SDKs/darwin/usr/include/fcntl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* ===-- fcntl.h - stub SDK header for compiler-rt --------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#include <sys/fcntl.h>
diff --git a/SDKs/darwin/usr/include/inttypes.h b/SDKs/darwin/usr/include/inttypes.h
deleted file mode 100644
index 406fa6fad..000000000
--- a/SDKs/darwin/usr/include/inttypes.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* ===-- inttypes.h - stub SDK header for compiler-rt -----------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __INTTYPES_H__
-#define __INTTYPES_H__
-
-#if __WORDSIZE == 64
-#define __INTTYPE_PRI64__ "l"
-#else
-#define __INTTYPE_PRI64__ "ll"
-#endif
-
-#define PRId8 "hhd"
-#define PRId16 "hd"
-#define PRId32 "d"
-#define PRId64 __INTTYPE_PRI64__ "d"
-
-#define PRIi8 "hhi"
-#define PRIi16 "hi"
-#define PRIi32 "i"
-#define PRIi64 __INTTYPE_PRI64__ "i"
-
-#define PRIo8 "hho"
-#define PRIo16 "ho"
-#define PRIo32 "o"
-#define PRIo64 __INTTYPE_PRI64__ "o"
-
-#define PRIu8 "hhu"
-#define PRIu16 "hu"
-#define PRIu32 "u"
-#define PRIu64 __INTTYPE_PRI64__ "u"
-
-#define PRIx8 "hhx"
-#define PRIx16 "hx"
-#define PRIx32 "x"
-#define PRIx64 __INTTYPE_PRI64__ "x"
-
-#define PRIX8 "hhX"
-#define PRIX16 "hX"
-#define PRIX32 "X"
-#define PRIX64 __INTTYPE_PRI64__ "X"
-
-#define SCNd8 "hhd"
-#define SCNd16 "hd"
-#define SCNd32 "d"
-#define SCNd64 __INTTYPE_PRI64__ "d"
-
-#define SCNi8 "hhi"
-#define SCNi16 "hi"
-#define SCNi32 "i"
-#define SCNi64 __INTTYPE_PRI64__ "i"
-
-#define SCNo8 "hho"
-#define SCNo16 "ho"
-#define SCNo32 "o"
-#define SCNo64 __INTTYPE_PRI64__ "o"
-
-#define SCNu8 "hhu"
-#define SCNu16 "hu"
-#define SCNu32 "u"
-#define SCNu64 __INTTYPE_PRI64__ "u"
-
-#define SCNx8 "hhx"
-#define SCNx16 "hx"
-#define SCNx32 "x"
-#define SCNx64 __INTTYPE_PRI64__ "x"
-
-#define SCNX8 "hhX"
-#define SCNX16 "hX"
-#define SCNX32 "X"
-#define SCNX64 __INTTYPE_PRI64__ "X"
-
-#endif /* __INTTYPES_H__ */
diff --git a/SDKs/darwin/usr/include/limits.h b/SDKs/darwin/usr/include/limits.h
deleted file mode 100644
index 5495a784f..000000000
--- a/SDKs/darwin/usr/include/limits.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ===-- limits.h - stub SDK header for compiler-rt -------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __LIMITS_H__
-#define __LIMITS_H__
-
-/* This is only here as a landing pad for the include_next from the compiler's
- built-in limits.h. */
-
-#endif /* __LIMITS_H__ */
diff --git a/SDKs/darwin/usr/include/stdio.h b/SDKs/darwin/usr/include/stdio.h
deleted file mode 100644
index 1a8781f20..000000000
--- a/SDKs/darwin/usr/include/stdio.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __STDIO_H__
-#define __STDIO_H__
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-typedef struct __sFILE FILE;
-typedef __SIZE_TYPE__ size_t;
-
-/* Determine the appropriate fdopen, fopen(), and fwrite() functions. */
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
-# if defined(__i386)
-# define __FDOPEN_NAME "_fdopen$UNIX2003"
-# define __FOPEN_NAME "_fopen$UNIX2003"
-# define __FWRITE_NAME "_fwrite$UNIX2003"
-# elif defined(__x86_64__)
-# define __FDOPEN_NAME "_fdopen"
-# define __FOPEN_NAME "_fopen"
-# define __FWRITE_NAME "_fwrite"
-# elif defined(__arm) || defined(__arm64)
-# define __FDOPEN_NAME "_fdopen"
-# define __FOPEN_NAME "_fopen"
-# define __FWRITE_NAME "_fwrite"
-# else
-# error "unrecognized architecture for targeting OS X"
-# endif
-#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
-# if defined(__i386) || defined (__x86_64)
-# define __FDOPEN_NAME "_fdopen"
-# define __FOPEN_NAME "_fopen"
-# define __FWRITE_NAME "_fwrite"
-# elif defined(__arm) || defined(__arm64)
-# define __FDOPEN_NAME "_fdopen"
-# define __FOPEN_NAME "_fopen"
-# define __FWRITE_NAME "_fwrite"
-# else
-# error "unrecognized architecture for targeting iOS"
-# endif
-#else
-# error "unrecognized architecture for targeting Darwin"
-#endif
-
-# define stderr __stderrp
-extern FILE *__stderrp;
-
-#ifndef SEEK_SET
-#define SEEK_SET 0 /* set file offset to offset */
-#endif
-#ifndef SEEK_CUR
-#define SEEK_CUR 1 /* set file offset to current plus offset */
-#endif
-#ifndef SEEK_END
-#define SEEK_END 2 /* set file offset to EOF plus offset */
-#endif
-
-int fclose(FILE *);
-int fflush(FILE *);
-FILE *fopen(const char * __restrict, const char * __restrict) __asm(__FOPEN_NAME);
-FILE *fdopen(int, const char *) __asm(__FDOPEN_NAME);
-int fprintf(FILE * __restrict, const char * __restrict, ...);
-int fputc(int, FILE *);
-size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict)
- __asm(__FWRITE_NAME);
-size_t fread(void * __restrict, size_t, size_t, FILE * __restrict);
-long ftell(FILE *);
-int fseek(FILE *, long, int);
-int snprintf(char * __restrict, size_t, const char * __restrict, ...);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __STDIO_H__ */
diff --git a/SDKs/darwin/usr/include/stdlib.h b/SDKs/darwin/usr/include/stdlib.h
deleted file mode 100644
index b6d3171cf..000000000
--- a/SDKs/darwin/usr/include/stdlib.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* ===-- stdlib.h - stub SDK header for compiler-rt -------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __STDLIB_H__
-#define __STDLIB_H__
-
-#define NULL ((void *)0)
-
-typedef __SIZE_TYPE__ size_t;
-
-void abort(void) __attribute__((__noreturn__));
-int atexit(void (*)(void));
-int atoi(const char *);
-void free(void *);
-char *getenv(const char *);
-void *malloc(size_t);
-void *realloc(void *, size_t);
-
-#endif /* __STDLIB_H__ */
diff --git a/SDKs/darwin/usr/include/string.h b/SDKs/darwin/usr/include/string.h
deleted file mode 100644
index 048fdba8f..000000000
--- a/SDKs/darwin/usr/include/string.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* ===-- string.h - stub SDK header for compiler-rt -------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __STRING_H__
-#define __STRING_H__
-
-typedef __SIZE_TYPE__ size_t;
-
-int memcmp(const void *, const void *, size_t);
-void *memcpy(void *, const void *, size_t);
-void *memset(void *, int, size_t);
-char *strcat(char *, const char *);
-char *strcpy(char *, const char *);
-char *strdup(const char *);
-size_t strlen(const char *);
-char *strncpy(char *, const char *, size_t);
-
-/* Determine the appropriate strerror() function. */
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
-# if defined(__i386)
-# define __STRERROR_NAME "_strerror$UNIX2003"
-# elif defined(__x86_64__) || defined(__arm) || defined(__arm64)
-# define __STRERROR_NAME "_strerror"
-# else
-# error "unrecognized architecture for targeting OS X"
-# endif
-#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
-# if defined(__i386) || defined (__x86_64) || defined(__arm) || defined(__arm64)
-# define __STRERROR_NAME "_strerror"
-# else
-# error "unrecognized architecture for targeting iOS"
-# endif
-#else
-# error "unrecognized architecture for targeting Darwin"
-#endif
-
-char *strerror(int) __asm(__STRERROR_NAME);
-
-#endif /* __STRING_H__ */
diff --git a/SDKs/darwin/usr/include/sys/errno.h b/SDKs/darwin/usr/include/sys/errno.h
deleted file mode 100644
index 4befe3855..000000000
--- a/SDKs/darwin/usr/include/sys/errno.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ===-- errno.h - stub SDK header for compiler-rt --------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef _SYS_ERRNO_H_
-#define _SYS_ERRNO_H_
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-extern int *__error(void);
-#define errno (*__error())
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
diff --git a/SDKs/darwin/usr/include/sys/fcntl.h b/SDKs/darwin/usr/include/sys/fcntl.h
deleted file mode 100644
index 96b24384a..000000000
--- a/SDKs/darwin/usr/include/sys/fcntl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* ===-- fcntl.h - stub SDK header for compiler-rt --------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef _SYS_FCNTL_H_
-#define _SYS_FCNTL_H_
-
-/* Determine the appropriate open function. */
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
-# if defined(__i386)
-# define __OPEN_NAME "_open$UNIX2003"
-# elif defined(__x86_64__)
-# define __OPEN_NAME "_open"
-# elif defined(__arm) || defined(__arm64)
-# define __OPEN_NAME "_open"
-# else
-# error "unrecognized architecture for targeting OS X"
-# endif
-#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
-# if defined(__i386) || defined (__x86_64)
-# define __OPEN_NAME "_open"
-# elif defined(__arm) || defined(__arm64)
-# define __OPEN_NAME "_open"
-# else
-# error "unrecognized architecture for targeting iOS"
-# endif
-#else
-# error "unrecognized architecture for targeting Darwin"
-#endif
-
-#define O_RDONLY 0x0000 /* open for reading only */
-#define O_WRONLY 0x0001 /* open for writing only */
-#define O_RDWR 0x0002 /* open for reading and writing */
-#define O_ACCMODE 0x0003 /* mask for above modes */
-
-#define O_CREAT 0x0200 /* create if nonexistent */
-
-int open(const char *, int, ...) __asm(__OPEN_NAME);
-
-#endif /* !_SYS_FCNTL_H_ */
diff --git a/SDKs/darwin/usr/include/sys/mman.h b/SDKs/darwin/usr/include/sys/mman.h
deleted file mode 100644
index 84561f1b6..000000000
--- a/SDKs/darwin/usr/include/sys/mman.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* ===-- mman.h - stub SDK header for compiler-rt ---------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __SYS_MMAN_H__
-#define __SYS_MMAN_H__
-
-typedef __SIZE_TYPE__ size_t;
-
-#define PROT_NONE 0x00
-#define PROT_READ 0x01
-#define PROT_WRITE 0x02
-#define PROT_EXEC 0x04
-
-#define MAP_SHARED 0x0001
-#define MAP_PRIVATE 0x0002
-
-#define MAP_FILE 0x0000
-#define MAP_ANON 0x1000
-
-#define MS_ASYNC 0x0001
-#define MS_INVALIDATE 0x0002
-#define MS_SYNC 0x0010
-
-void *mmap(void *addr, size_t len, int prot, int flags, int fd,
- long long offset);
-int munmap(void *addr, size_t len);
-int msync(void *addr, size_t len, int flags);
-
-#endif /* __SYS_MMAN_H__ */
diff --git a/SDKs/darwin/usr/include/sys/stat.h b/SDKs/darwin/usr/include/sys/stat.h
deleted file mode 100644
index 6225f9081..000000000
--- a/SDKs/darwin/usr/include/sys/stat.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* ===-- stat.h - stub SDK header for compiler-rt ---------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __SYS_STAT_H__
-#define __SYS_STAT_H__
-
-typedef unsigned short uint16_t;
-typedef uint16_t mode_t;
-
-int mkdir(const char *, mode_t);
-
-#endif /* __SYS_STAT_H__ */
diff --git a/SDKs/darwin/usr/include/sys/types.h b/SDKs/darwin/usr/include/sys/types.h
deleted file mode 100644
index b425767b8..000000000
--- a/SDKs/darwin/usr/include/sys/types.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ===-- types.h - stub SDK header for compiler-rt --------------------------===
- *
- * The LLVM Compiler Infrastructure
- *
- * This file is dual licensed under the MIT and the University of Illinois Open
- * Source Licenses. See LICENSE.TXT for details.
- *
- * ===-----------------------------------------------------------------------===
- *
- * This is a stub SDK header file. This file is not part of the interface of
- * this library nor an official version of the appropriate SDK header. It is
- * intended only to stub the features of this header required by compiler-rt.
- *
- * ===-----------------------------------------------------------------------===
- */
-
-#ifndef __SYS_TYPES_H__
-#define __SYS_TYPES_H__
-
-#endif /* __SYS_TYPES_H__ */