1 include(clrfeatures.cmake)
3 # If set, indicates that this is not an officially supported release
4 # Keep in sync with IsPrerelease in dir.props
7 # Features we're currently flighting, but don't intend to ship in officially supported releases
9 add_definitions(-DFEATURE_UTF8STRING)
10 # add_definitions(-DFEATURE_XXX)
13 if (CLR_CMAKE_TARGET_ARCH_AMD64)
14 if (CLR_CMAKE_PLATFORM_UNIX)
15 add_definitions(-DDBG_TARGET_AMD64_UNIX)
17 add_definitions(-D_TARGET_AMD64_)
18 add_definitions(-D_TARGET_64BIT_)
19 add_definitions(-DDBG_TARGET_64BIT)
20 add_definitions(-DDBG_TARGET_AMD64)
21 add_definitions(-DDBG_TARGET_WIN64)
22 elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
23 if (CLR_CMAKE_PLATFORM_UNIX)
24 add_definitions(-DDBG_TARGET_ARM64_UNIX)
25 add_definitions(-DFEATURE_EMULATE_SINGLESTEP)
27 add_definitions(-D_TARGET_ARM64_)
28 add_definitions(-D_TARGET_64BIT_)
29 add_definitions(-DDBG_TARGET_64BIT)
30 add_definitions(-DDBG_TARGET_ARM64)
31 add_definitions(-DDBG_TARGET_WIN64)
32 add_definitions(-DFEATURE_MULTIREG_RETURN)
33 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
34 if (CLR_CMAKE_PLATFORM_UNIX)
35 add_definitions(-DDBG_TARGET_ARM_UNIX)
36 elseif (WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
37 # Set this to ensure we can use Arm SDK for Desktop binary linkage when doing native (Arm32) build
38 add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
39 add_definitions(-D_ARM_WORKAROUND_)
40 endif (CLR_CMAKE_PLATFORM_UNIX)
41 add_definitions(-D_TARGET_ARM_)
42 add_definitions(-DDBG_TARGET_32BIT)
43 add_definitions(-DDBG_TARGET_ARM)
44 add_definitions(-DFEATURE_EMULATE_SINGLESTEP)
45 elseif (CLR_CMAKE_TARGET_ARCH_I386)
46 add_definitions(-D_TARGET_X86_)
47 add_definitions(-DDBG_TARGET_32BIT)
48 add_definitions(-DDBG_TARGET_X86)
51 endif (CLR_CMAKE_TARGET_ARCH_AMD64)
53 if (CLR_CMAKE_PLATFORM_UNIX)
55 if(CLR_CMAKE_PLATFORM_DARWIN)
56 add_definitions(-D_XOPEN_SOURCE)
57 add_definitions(-DFEATURE_DATATARGET4)
58 endif(CLR_CMAKE_PLATFORM_DARWIN)
60 if (CLR_CMAKE_TARGET_ARCH_AMD64)
61 add_definitions(-DUNIX_AMD64_ABI)
62 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
63 add_definitions(-DUNIX_ARM_ABI)
64 add_definitions(-DFEATURE_DATATARGET4)
65 elseif (CLR_CMAKE_TARGET_ARCH_I386)
66 add_definitions(-DUNIX_X86_ABI)
69 endif(CLR_CMAKE_PLATFORM_UNIX)
71 if(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
72 # Alpine Linux doesn't have fixed stack limit, this define disables some stack pointer
73 # sanity checks in debug / checked build that rely on a fixed stack limit
74 add_definitions(-DNO_FIXED_STACK_LIMIT)
75 endif(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
77 add_definitions(-D_BLD_CLR)
78 add_definitions(-DDEBUGGING_SUPPORTED)
79 add_definitions(-DPROFILING_SUPPORTED)
82 add_definitions(-DWIN32)
83 add_definitions(-D_WIN32)
84 add_definitions(-DWINVER=0x0602)
85 add_definitions(-D_WIN32_WINNT=0x0602)
86 add_definitions(-DWIN32_LEAN_AND_MEAN)
87 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
88 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
89 # Only enable edit and continue on windows x86 and x64
90 # exclude Linux, arm & arm64
91 add_definitions(-DEnC_SUPPORTED)
92 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
95 # Features - please keep them alphabetically sorted
97 add_definitions(-DFEATURE_APPX)
98 if(NOT CLR_CMAKE_TARGET_ARCH_I386)
99 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
100 add_definitions(-DFEATURE_MULTICASTSTUB_AS_IL)
103 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
104 add_definitions(-DFEATURE_MULTICASTSTUB_AS_IL)
106 add_definitions(-DFEATURE_CODE_VERSIONING)
107 add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
110 add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
111 add_definitions(-DFEATURE_COMINTEROP)
112 add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
113 add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
114 add_definitions(-DFEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION)
117 add_definitions(-DFEATURE_BASICFREEZE)
118 add_definitions(-DFEATURE_CORECLR)
119 add_definitions(-DFEATURE_CORESYSTEM)
120 add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
122 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
123 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
124 endif(FEATURE_DBGIPC)
125 add_definitions(-DFEATURE_DEFAULT_INTERFACES)
126 if(FEATURE_EVENT_TRACE)
127 add_definitions(-DFEATURE_EVENT_TRACE)
128 add_definitions(-DFEATURE_PERFTRACING)
129 endif(FEATURE_EVENT_TRACE)
131 add_definitions(-DFEATURE_GDBJIT)
133 if(FEATURE_GDBJIT_FRAME)
134 add_definitions(-DFEATURE_GDBJIT_FRAME)
135 endif(FEATURE_GDBJIT_FRAME)
136 if(FEATURE_GDBJIT_LANGID_CS)
137 add_definitions(-DFEATURE_GDBJIT_LANGID_CS)
138 endif(FEATURE_GDBJIT_LANGID_CS)
139 if(FEATURE_GDBJIT_SYMTAB)
140 add_definitions(-DFEATURE_GDBJIT_SYMTAB)
141 endif(FEATURE_GDBJIT_SYMTAB)
142 if(CLR_CMAKE_PLATFORM_UNIX)
143 add_definitions(-DFEATURE_EVENTSOURCE_XPLAT)
144 endif(CLR_CMAKE_PLATFORM_UNIX)
145 # NetBSD doesn't implement this feature
146 if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
147 add_definitions(-DFEATURE_HIJACK)
148 endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
149 add_definitions(-DFEATURE_ICASTABLE)
150 if (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
151 add_definitions(-DFEATURE_INTEROP_DEBUGGING)
152 endif (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
153 if(FEATURE_INTERPRETER)
154 add_definitions(-DFEATURE_INTERPRETER)
155 endif(FEATURE_INTERPRETER)
156 add_definitions(-DFEATURE_ISYM_READER)
157 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
158 add_definitions(-DFEATURE_JUMPSTAMP)
159 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
160 if (CLR_CMAKE_PLATFORM_LINUX OR WIN32)
161 add_definitions(-DFEATURE_MANAGED_ETW)
162 endif(CLR_CMAKE_PLATFORM_LINUX OR WIN32)
163 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
165 if(FEATURE_MERGE_JIT_AND_ENGINE)
166 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
167 endif(FEATURE_MERGE_JIT_AND_ENGINE)
168 add_definitions(-DFEATURE_MULTICOREJIT)
169 if (FEATURE_NI_BIND_FALLBACK)
170 add_definitions(-DFEATURE_NI_BIND_FALLBACK)
171 endif(FEATURE_NI_BIND_FALLBACK)
172 if(CLR_CMAKE_PLATFORM_UNIX)
173 add_definitions(-DFEATURE_PAL)
174 add_definitions(-DFEATURE_PAL_SXS)
175 add_definitions(-DFEATURE_PAL_ANSI)
176 endif(CLR_CMAKE_PLATFORM_UNIX)
177 if(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
178 add_definitions(-DFEATURE_PERFMAP)
179 endif(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
181 add_definitions(-DFEATURE_PREJIT)
182 endif(FEATURE_PREJIT)
184 if(WIN32 OR CLR_CMAKE_PLATFORM_LINUX)
185 add_definitions(-DFEATURE_PROFAPI_ATTACH_DETACH)
186 endif(WIN32 OR CLR_CMAKE_PLATFORM_LINUX)
188 add_definitions(-DFEATURE_READYTORUN)
189 set(FEATURE_READYTORUN 1)
191 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
192 add_definitions(-DFEATURE_REJIT)
193 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
195 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
196 add_definitions(-DFEATURE_STUBS_AS_IL)
198 if (FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
199 add_definitions(-DFEATURE_NGEN_RELOCS_OPTIMIZATIONS)
200 endif(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
201 if (FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
202 add_definitions(-DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
203 endif(FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
204 add_definitions(-DFEATURE_SVR_GC)
205 add_definitions(-DFEATURE_SYMDIFF)
206 add_definitions(-DFEATURE_TIERED_COMPILATION)
208 add_definitions(-DFEATURE_TYPEEQUIVALENCE)
210 if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
211 # Enable the AMD64 Unix struct passing JIT-EE interface for all AMD64 platforms, to enable altjit.
212 add_definitions(-DUNIX_AMD64_ABI_ITF)
213 endif (CLR_CMAKE_PLATFORM_ARCH_AMD64)
214 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
215 add_definitions(-DFEATURE_MULTIREG_RETURN)
216 endif (CLR_CMAKE_PLATFORM_UNIX_AMD64)
217 if(CLR_CMAKE_PLATFORM_UNIX AND CLR_CMAKE_TARGET_ARCH_AMD64)
218 add_definitions(-DUNIX_AMD64_ABI)
219 endif(CLR_CMAKE_PLATFORM_UNIX AND CLR_CMAKE_TARGET_ARCH_AMD64)
220 add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
221 if(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
222 add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
223 endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
224 if((CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) AND NOT WIN32)
225 add_definitions(-DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES)
226 endif((CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) AND NOT WIN32)
229 add_definitions(-DFEATURE_VERSIONING_LOG)
231 if(NOT CLR_CMAKE_PLATFORM_UNIX)
232 add_definitions(-DFEATURE_WIN32_REGISTRY)
233 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
234 add_definitions(-DFEATURE_WINMD_RESILIENT)
235 add_definitions(-D_SECURE_SCL=0)
236 add_definitions(-DUNICODE)
237 add_definitions(-D_UNICODE)
240 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
241 add_definitions(-DFEATURE_DATABREAKPOINT)
242 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)