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)
107 if(NOT CLR_CMAKE_TARGET_ARCH_I386)
108 add_definitions(-DFEATURE_PORTABLE_SHUFFLE_THUNKS)
111 if(CLR_CMAKE_PLATFORM_UNIX OR NOT CLR_CMAKE_TARGET_ARCH_I386)
112 add_definitions(-DFEATURE_INSTANTIATINGSTUB_AS_IL)
115 add_definitions(-DFEATURE_CODE_VERSIONING)
116 add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
119 add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
120 add_definitions(-DFEATURE_COMINTEROP)
121 add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
122 add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
123 add_definitions(-DFEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION)
126 add_definitions(-DFEATURE_BASICFREEZE)
127 add_definitions(-DFEATURE_CORECLR)
128 add_definitions(-DFEATURE_CORESYSTEM)
129 add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
131 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
132 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
133 endif(FEATURE_DBGIPC)
134 add_definitions(-DFEATURE_DEFAULT_INTERFACES)
135 if(FEATURE_EVENT_TRACE)
136 add_definitions(-DFEATURE_EVENT_TRACE)
137 add_definitions(-DFEATURE_PERFTRACING)
138 endif(FEATURE_EVENT_TRACE)
140 add_definitions(-DFEATURE_GDBJIT)
142 if(FEATURE_GDBJIT_FRAME)
143 add_definitions(-DFEATURE_GDBJIT_FRAME)
144 endif(FEATURE_GDBJIT_FRAME)
145 if(FEATURE_GDBJIT_LANGID_CS)
146 add_definitions(-DFEATURE_GDBJIT_LANGID_CS)
147 endif(FEATURE_GDBJIT_LANGID_CS)
148 if(FEATURE_GDBJIT_SYMTAB)
149 add_definitions(-DFEATURE_GDBJIT_SYMTAB)
150 endif(FEATURE_GDBJIT_SYMTAB)
151 if(CLR_CMAKE_PLATFORM_UNIX)
152 add_definitions(-DFEATURE_EVENTSOURCE_XPLAT)
153 endif(CLR_CMAKE_PLATFORM_UNIX)
154 # NetBSD doesn't implement this feature
155 if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
156 add_definitions(-DFEATURE_HIJACK)
157 endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
158 add_definitions(-DFEATURE_ICASTABLE)
159 if (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
160 add_definitions(-DFEATURE_INTEROP_DEBUGGING)
161 endif (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
162 if(FEATURE_INTERPRETER)
163 add_definitions(-DFEATURE_INTERPRETER)
164 endif(FEATURE_INTERPRETER)
165 add_definitions(-DFEATURE_ISYM_READER)
166 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
167 add_definitions(-DFEATURE_JUMPSTAMP)
168 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
169 if (CLR_CMAKE_PLATFORM_LINUX OR WIN32)
170 add_definitions(-DFEATURE_MANAGED_ETW)
171 endif(CLR_CMAKE_PLATFORM_LINUX OR WIN32)
172 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
174 if(FEATURE_IBCLOGGER)
175 add_definitions(-DFEATURE_IBCLOGGER)
176 endif(FEATURE_IBCLOGGER)
178 if(FEATURE_MERGE_JIT_AND_ENGINE)
179 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
180 endif(FEATURE_MERGE_JIT_AND_ENGINE)
181 add_definitions(-DFEATURE_MULTICOREJIT)
182 if (FEATURE_NI_BIND_FALLBACK)
183 add_definitions(-DFEATURE_NI_BIND_FALLBACK)
184 endif(FEATURE_NI_BIND_FALLBACK)
185 if(CLR_CMAKE_PLATFORM_UNIX)
186 add_definitions(-DFEATURE_PAL)
187 add_definitions(-DFEATURE_PAL_SXS)
188 add_definitions(-DFEATURE_PAL_ANSI)
189 endif(CLR_CMAKE_PLATFORM_UNIX)
190 if(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
191 add_definitions(-DFEATURE_PERFMAP)
192 endif(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
194 add_definitions(-DFEATURE_PREJIT)
195 endif(FEATURE_PREJIT)
197 if(WIN32 OR CLR_CMAKE_PLATFORM_LINUX)
198 add_definitions(-DFEATURE_PROFAPI_ATTACH_DETACH)
199 endif(WIN32 OR CLR_CMAKE_PLATFORM_LINUX)
201 add_definitions(-DFEATURE_READYTORUN)
202 set(FEATURE_READYTORUN 1)
204 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
205 add_definitions(-DFEATURE_REJIT)
206 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
208 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
209 add_definitions(-DFEATURE_STUBS_AS_IL)
211 if (FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
212 add_definitions(-DFEATURE_NGEN_RELOCS_OPTIMIZATIONS)
213 endif(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
214 if (FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
215 add_definitions(-DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
216 endif(FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
217 add_definitions(-DFEATURE_SVR_GC)
218 add_definitions(-DFEATURE_SYMDIFF)
219 add_definitions(-DFEATURE_TIERED_COMPILATION)
221 add_definitions(-DFEATURE_TYPEEQUIVALENCE)
223 if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
224 # Enable the AMD64 Unix struct passing JIT-EE interface for all AMD64 platforms, to enable altjit.
225 add_definitions(-DUNIX_AMD64_ABI_ITF)
226 endif (CLR_CMAKE_PLATFORM_ARCH_AMD64)
227 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
228 add_definitions(-DFEATURE_MULTIREG_RETURN)
229 endif (CLR_CMAKE_PLATFORM_UNIX_AMD64)
230 if(CLR_CMAKE_PLATFORM_UNIX AND CLR_CMAKE_TARGET_ARCH_AMD64)
231 add_definitions(-DUNIX_AMD64_ABI)
232 endif(CLR_CMAKE_PLATFORM_UNIX AND CLR_CMAKE_TARGET_ARCH_AMD64)
233 add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
234 if(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
235 add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
236 endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64)
237 if((CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) AND NOT WIN32)
238 add_definitions(-DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES)
239 endif((CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) AND NOT WIN32)
242 add_definitions(-DFEATURE_VERSIONING_LOG)
244 if(NOT CLR_CMAKE_PLATFORM_UNIX)
245 add_definitions(-DFEATURE_WIN32_REGISTRY)
246 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
247 add_definitions(-DFEATURE_WINMD_RESILIENT)
248 add_definitions(-D_SECURE_SCL=0)
249 add_definitions(-DUNICODE)
250 add_definitions(-D_UNICODE)
253 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
254 add_definitions(-DFEATURE_DATABREAKPOINT)
255 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
258 if(CLR_CMAKE_PLATFORM_DARWIN)
259 add_definitions(-DFEATURE_WRITEBARRIER_COPY)
260 endif(CLR_CMAKE_PLATFORM_DARWIN)
262 if(TIZEN_AGGRESSIVE_INLINING_GENERIC)
263 add_definitions(-DTIZEN_AGGRESSIVE_INLINING_GENERIC)
264 endif(TIZEN_AGGRESSIVE_INLINING_GENERIC)