forked from macmade/OBJC4-437.1-Runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjc-config.h
93 lines (78 loc) · 2.95 KB
/
objc-config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* Copyright (c) 1999-2002, 2005-2008 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
#include <TargetConditionals.h>
// Define NO_GC to disable garbage collection.
// Be sure to edit OBJC_NO_GC in objc-auto.h as well.
#if TARGET_OS_EMBEDDED || TARGET_OS_WIN32
# define NO_GC 1
#endif
// Define NO_ENVIRON to disable getenv().
#if TARGET_OS_EMBEDDED
# define NO_ENVIRON 1
#endif
// Define NO_ZONES to disable malloc zone support in NXHashTable.
#if TARGET_OS_EMBEDDED
# define NO_ZONES 1
#endif
// Define NO_MOD to avoid the mod operator in NXHashTable and objc-sel-set.
#if defined(__arm__)
# define NO_MOD 1
#endif
// Define NO_BUILTINS to disable the builtin selector table from dyld
#if TARGET_OS_WIN32
# define NO_BUILTINS 1
#endif
// Define NO_DEBUGGER_MODE to disable lock-avoiding execution for debuggers
#if TARGET_OS_WIN32
# define NO_DEBUGGER_MODE 1
#endif
#if __OBJC2__
// Define NO_FIXUP to use non-fixup messaging for OBJC2.
#if defined(__arm__)
# define NO_FIXUP 1
#endif
// Define NO_VTABLE to disable vtable dispatch for OBJC2.
#if defined(NO_FIXUP) || defined(__ppc64__)
# define NO_VTABLE 1
#endif
// Define NO_ZEROCOST_EXCEPTIONS to use sjlj exceptions for OBJC2.
// Be sure to edit objc-exception.h as well (objc_add/removeExceptionHandler)
#if defined(__arm__)
# define NO_ZEROCOST_EXCEPTIONS 1
#endif
#endif
// OBJC_INSTRUMENTED controls whether message dispatching is dynamically
// monitored. Monitoring introduces substantial overhead.
// NOTE: To define this condition, do so in the build command, NOT by
// uncommenting the line here. This is because objc-class.h heeds this
// condition, but objc-class.h can not #include this file (objc-config.h)
// because objc-class.h is public and objc-config.h is not.
//#define OBJC_INSTRUMENTED
// Get the nice macros for subroutine calling, etc.
// Not available on all architectures. Not needed
// (by us) on some configurations.
#if defined (__i386__) || defined (i386)
# include <architecture/i386/asm_help.h>
#elif defined (__ppc__) || defined(ppc)
# include <architecture/ppc/asm_help.h>
#endif