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_DEFAULT_INTERFACES=1)
12 if (CLR_CMAKE_TARGET_ARCH_AMD64)
13 if (CLR_CMAKE_PLATFORM_UNIX)
14 add_definitions(-DDBG_TARGET_AMD64_UNIX)
16 add_definitions(-D_TARGET_AMD64_=1)
17 add_definitions(-D_TARGET_64BIT_=1)
18 add_definitions(-DDBG_TARGET_64BIT=1)
19 add_definitions(-DDBG_TARGET_AMD64=1)
20 add_definitions(-DDBG_TARGET_WIN64=1)
21 elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
22 if (CLR_CMAKE_PLATFORM_UNIX)
23 add_definitions(-DDBG_TARGET_ARM64_UNIX)
25 add_definitions(-D_TARGET_ARM64_=1)
26 add_definitions(-D_TARGET_64BIT_=1)
27 add_definitions(-DDBG_TARGET_64BIT=1)
28 add_definitions(-DDBG_TARGET_ARM64=1)
29 add_definitions(-DDBG_TARGET_WIN64=1)
30 add_definitions(-DFEATURE_MULTIREG_RETURN)
31 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
32 if (CLR_CMAKE_PLATFORM_UNIX)
33 add_definitions(-DDBG_TARGET_ARM_UNIX)
34 elseif (WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
35 # Set this to ensure we can use Arm SDK for Desktop binary linkage when doing native (Arm32) build
36 add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1)
37 add_definitions(-D_ARM_WORKAROUND_)
38 endif (CLR_CMAKE_PLATFORM_UNIX)
39 add_definitions(-D_TARGET_ARM_=1)
40 add_definitions(-DDBG_TARGET_32BIT=1)
41 add_definitions(-DDBG_TARGET_ARM=1)
42 elseif (CLR_CMAKE_TARGET_ARCH_I386)
43 add_definitions(-D_TARGET_X86_=1)
44 add_definitions(-DDBG_TARGET_32BIT=1)
45 add_definitions(-DDBG_TARGET_X86=1)
48 endif (CLR_CMAKE_TARGET_ARCH_AMD64)
50 if (CLR_CMAKE_PLATFORM_UNIX)
52 if(CLR_CMAKE_PLATFORM_DARWIN)
53 add_definitions(-D_XOPEN_SOURCE)
54 add_definitions(-DFEATURE_DATATARGET4)
55 endif(CLR_CMAKE_PLATFORM_DARWIN)
57 if (CLR_CMAKE_TARGET_ARCH_AMD64)
58 add_definitions(-DUNIX_AMD64_ABI)
59 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
60 add_definitions(-DUNIX_ARM_ABI)
61 add_definitions(-DFEATURE_DATATARGET4)
62 elseif (CLR_CMAKE_TARGET_ARCH_I386)
63 add_definitions(-DUNIX_X86_ABI)
66 endif(CLR_CMAKE_PLATFORM_UNIX)
68 if(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
69 # Alpine Linux doesn't have fixed stack limit, this define disables some stack pointer
70 # sanity checks in debug / checked build that rely on a fixed stack limit
71 add_definitions(-DNO_FIXED_STACK_LIMIT)
72 endif(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
74 add_definitions(-D_BLD_CLR)
75 add_definitions(-DDEBUGGING_SUPPORTED)
76 add_definitions(-DPROFILING_SUPPORTED)
79 add_definitions(-DWIN32)
80 add_definitions(-D_WIN32)
81 add_definitions(-DWINVER=0x0602)
82 add_definitions(-D_WIN32_WINNT=0x0602)
83 add_definitions(-DWIN32_LEAN_AND_MEAN=1)
84 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
85 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
86 # Only enable edit and continue on windows x86 and x64
87 # exclude Linux, arm & arm64
88 add_definitions(-DEnC_SUPPORTED)
89 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
92 # Features - please keep them alphabetically sorted
93 if (FEATURE_APPDOMAIN_RESOURCE_MONITORING)
94 add_definitions(-DFEATURE_APPDOMAIN_RESOURCE_MONITORING)
95 endif(FEATURE_APPDOMAIN_RESOURCE_MONITORING)
98 add_definitions(-DFEATURE_APPX)
99 if(NOT CLR_CMAKE_TARGET_ARCH_I386)
100 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
101 add_definitions(-DFEATURE_MULTICASTSTUB_AS_IL)
104 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
105 add_definitions(-DFEATURE_MULTICASTSTUB_AS_IL)
107 add_definitions(-DFEATURE_CODE_VERSIONING)
108 add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
111 add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
112 add_definitions(-DFEATURE_COMINTEROP)
113 add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
114 add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
115 add_definitions(-DFEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION)
118 add_definitions(-DFEATURE_CORECLR)
119 if (CLR_CMAKE_PLATFORM_UNIX)
120 add_definitions(-DFEATURE_COREFX_GLOBALIZATION)
121 endif(CLR_CMAKE_PLATFORM_UNIX)
122 add_definitions(-DFEATURE_CORESYSTEM)
123 add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
125 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
126 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
127 endif(FEATURE_DBGIPC)
128 if(FEATURE_EVENT_TRACE)
129 add_definitions(-DFEATURE_EVENT_TRACE=1)
130 add_definitions(-DFEATURE_PERFTRACING=1)
131 endif(FEATURE_EVENT_TRACE)
133 add_definitions(-DFEATURE_GDBJIT)
135 if(FEATURE_GDBJIT_FRAME)
136 add_definitions(-DFEATURE_GDBJIT_FRAME)
137 endif(FEATURE_GDBJIT_FRAME)
138 if(FEATURE_GDBJIT_LANGID_CS)
139 add_definitions(-DFEATURE_GDBJIT_LANGID_CS)
140 endif(FEATURE_GDBJIT_LANGID_CS)
141 if(FEATURE_GDBJIT_SYMTAB)
142 add_definitions(-DFEATURE_GDBJIT_SYMTAB)
143 endif(FEATURE_GDBJIT_SYMTAB)
144 if(CLR_CMAKE_PLATFORM_UNIX)
145 add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
146 endif(CLR_CMAKE_PLATFORM_UNIX)
147 # NetBSD doesn't implement this feature
148 if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
149 add_definitions(-DFEATURE_HIJACK)
150 endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
151 add_definitions(-DFEATURE_ICASTABLE)
152 if (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
153 add_definitions(-DFEATURE_INTEROP_DEBUGGING)
154 endif (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
155 if(FEATURE_INTERPRETER)
156 add_definitions(-DFEATURE_INTERPRETER)
157 endif(FEATURE_INTERPRETER)
158 add_definitions(-DFEATURE_ISYM_READER)
159 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
160 add_definitions(-DFEATURE_JUMPSTAMP)
161 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
162 if (CLR_CMAKE_PLATFORM_LINUX OR WIN32)
163 add_definitions(-DFEATURE_MANAGED_ETW)
164 endif(CLR_CMAKE_PLATFORM_LINUX OR WIN32)
165 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
167 if(FEATURE_MERGE_JIT_AND_ENGINE)
168 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
169 endif(FEATURE_MERGE_JIT_AND_ENGINE)
170 add_definitions(-DFEATURE_MULTICOREJIT)
171 if (FEATURE_NI_BIND_FALLBACK)
172 add_definitions(-DFEATURE_NI_BIND_FALLBACK)
173 endif(FEATURE_NI_BIND_FALLBACK)
174 if(CLR_CMAKE_PLATFORM_UNIX)
175 add_definitions(-DFEATURE_PAL)
176 add_definitions(-DFEATURE_PAL_SXS)
177 add_definitions(-DFEATURE_PAL_ANSI)
178 endif(CLR_CMAKE_PLATFORM_UNIX)
179 if(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
180 add_definitions(-DFEATURE_PERFMAP)
181 endif(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD)
182 add_definitions(-DFEATURE_PREJIT)
184 if(NOT CLR_CMAKE_PLATFORM_UNIX)
185 add_definitions(-DFEATURE_PROFAPI_ATTACH_DETACH)
186 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
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 add_definitions(-DFEATURE_STANDALONE_SN)
196 add_definitions(-DFEATURE_STRONGNAME_DELAY_SIGNING_ALLOWED)
197 add_definitions(-DFEATURE_STRONGNAME_MIGRATION)
198 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
199 add_definitions(-DFEATURE_STUBS_AS_IL)
201 if (FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
202 add_definitions(-DFEATURE_NGEN_RELOCS_OPTIMIZATIONS)
203 endif(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
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 AND NOT WIN32))
222 add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
223 endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR (CLR_CMAKE_PLATFORM_ARCH_ARM64 AND NOT WIN32))
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_LEGACYNETCF_DBG_HOST_CONTROL)
235 add_definitions(-DFEATURE_WINDOWSPHONE)
236 add_definitions(-DFEATURE_WINMD_RESILIENT)
237 add_definitions(-D_SECURE_SCL=0)
238 add_definitions(-DUNICODE)
239 add_definitions(-D_UNICODE)
242 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
243 add_definitions(-DFEATURE_DATABREAKPOINT)
244 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)