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(-DDBG_TARGET_64BIT=1)
18 add_definitions(-DDBG_TARGET_AMD64=1)
19 add_definitions(-DDBG_TARGET_WIN64=1)
20 elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
21 if (CLR_CMAKE_PLATFORM_UNIX)
22 add_definitions(-DDBG_TARGET_ARM64_UNIX)
24 add_definitions(-D_TARGET_ARM64_=1)
25 add_definitions(-DDBG_TARGET_64BIT=1)
26 add_definitions(-DDBG_TARGET_ARM64=1)
27 add_definitions(-DDBG_TARGET_WIN64=1)
28 add_definitions(-DFEATURE_MULTIREG_RETURN)
29 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
30 if (CLR_CMAKE_PLATFORM_UNIX)
31 add_definitions(-DDBG_TARGET_ARM_UNIX)
32 elseif (WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
33 # Set this to ensure we can use Arm SDK for Desktop binary linkage when doing native (Arm32) build
34 add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1)
35 add_definitions(-D_ARM_WORKAROUND_)
36 endif (CLR_CMAKE_PLATFORM_UNIX)
37 add_definitions(-D_TARGET_ARM_=1)
38 add_definitions(-DDBG_TARGET_32BIT=1)
39 add_definitions(-DDBG_TARGET_ARM=1)
40 elseif (CLR_CMAKE_TARGET_ARCH_I386)
41 add_definitions(-D_TARGET_X86_=1)
42 add_definitions(-DDBG_TARGET_32BIT=1)
43 add_definitions(-DDBG_TARGET_X86=1)
46 endif (CLR_CMAKE_TARGET_ARCH_AMD64)
48 if (CLR_CMAKE_PLATFORM_UNIX)
50 if(CLR_CMAKE_PLATFORM_DARWIN)
51 add_definitions(-D_XOPEN_SOURCE)
52 add_definitions(-DFEATURE_DATATARGET4)
53 endif(CLR_CMAKE_PLATFORM_DARWIN)
55 if (CLR_CMAKE_TARGET_ARCH_AMD64)
56 add_definitions(-DUNIX_AMD64_ABI)
57 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
58 add_definitions(-DUNIX_ARM_ABI)
59 add_definitions(-DFEATURE_DATATARGET4)
60 elseif (CLR_CMAKE_TARGET_ARCH_I386)
61 add_definitions(-DUNIX_X86_ABI)
64 endif(CLR_CMAKE_PLATFORM_UNIX)
66 if(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
67 # Alpine Linux doesn't have fixed stack limit, this define disables some stack pointer
68 # sanity checks in debug / checked build that rely on a fixed stack limit
69 add_definitions(-DNO_FIXED_STACK_LIMIT)
70 endif(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
72 add_definitions(-D_BLD_CLR)
73 add_definitions(-DDEBUGGING_SUPPORTED)
74 add_definitions(-DPROFILING_SUPPORTED)
77 add_definitions(-DWIN32)
78 add_definitions(-D_WIN32)
79 add_definitions(-DWINVER=0x0602)
80 add_definitions(-D_WIN32_WINNT=0x0602)
81 add_definitions(-DWIN32_LEAN_AND_MEAN=1)
82 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
83 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
84 # Only enable edit and continue on windows x86 and x64
85 # exclude Linux, arm & arm64
86 add_definitions(-DEnC_SUPPORTED)
87 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
90 # Features - please keep them alphabetically sorted
91 if (FEATURE_APPDOMAIN_RESOURCE_MONITORING)
92 add_definitions(-DFEATURE_APPDOMAIN_RESOURCE_MONITORING)
93 endif(FEATURE_APPDOMAIN_RESOURCE_MONITORING)
96 add_definitions(-DFEATURE_APPX)
97 if(NOT CLR_CMAKE_TARGET_ARCH_I386)
98 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
99 add_definitions(-DFEATURE_MULTICASTSTUB_AS_IL)
102 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
103 add_definitions(-DFEATURE_MULTICASTSTUB_AS_IL)
105 add_definitions(-DFEATURE_CODE_VERSIONING)
106 add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
109 add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
110 add_definitions(-DFEATURE_COMINTEROP)
111 add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
112 add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
113 add_definitions(-DFEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION)
116 add_definitions(-DFEATURE_CORECLR)
117 if (CLR_CMAKE_PLATFORM_UNIX)
118 add_definitions(-DFEATURE_COREFX_GLOBALIZATION)
119 endif(CLR_CMAKE_PLATFORM_UNIX)
120 add_definitions(-DFEATURE_CORESYSTEM)
121 add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
123 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
124 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
125 endif(FEATURE_DBGIPC)
126 if(FEATURE_EVENT_TRACE)
127 add_definitions(-DFEATURE_EVENT_TRACE=1)
128 add_definitions(-DFEATURE_PERFTRACING=1)
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=1)
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))
151 add_definitions(-DFEATURE_INTEROP_DEBUGGING)
152 endif (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386))
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 add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
161 if (CLR_CMAKE_PLATFORM_LINUX OR WIN32)
162 add_definitions(-DFEATURE_MANAGED_ETW)
163 endif(CLR_CMAKE_PLATFORM_LINUX OR WIN32)
164 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
166 if(FEATURE_MERGE_JIT_AND_ENGINE)
167 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
168 endif(FEATURE_MERGE_JIT_AND_ENGINE)
169 add_definitions(-DFEATURE_MULTICOREJIT)
170 if (FEATURE_NI_BIND_FALLBACK)
171 add_definitions(-DFEATURE_NI_BIND_FALLBACK)
172 endif(FEATURE_NI_BIND_FALLBACK)
173 if(CLR_CMAKE_PLATFORM_UNIX)
174 add_definitions(-DFEATURE_PAL)
175 add_definitions(-DFEATURE_PAL_SXS)
176 add_definitions(-DFEATURE_PAL_ANSI)
177 endif(CLR_CMAKE_PLATFORM_UNIX)
178 if(CLR_CMAKE_PLATFORM_LINUX)
179 add_definitions(-DFEATURE_PERFMAP)
180 endif(CLR_CMAKE_PLATFORM_LINUX)
181 add_definitions(-DFEATURE_PREJIT)
183 add_definitions(-DFEATURE_READYTORUN)
184 set(FEATURE_READYTORUN 1)
186 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
187 add_definitions(-DFEATURE_REJIT)
188 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
190 add_definitions(-DFEATURE_STANDALONE_SN)
191 add_definitions(-DFEATURE_STRONGNAME_DELAY_SIGNING_ALLOWED)
192 add_definitions(-DFEATURE_STRONGNAME_MIGRATION)
193 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
194 add_definitions(-DFEATURE_STUBS_AS_IL)
196 add_definitions(-DFEATURE_SVR_GC)
197 add_definitions(-DFEATURE_SYMDIFF)
198 add_definitions(-DFEATURE_TIERED_COMPILATION)
199 if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
200 # Enable the AMD64 Unix struct passing JIT-EE interface for all AMD64 platforms, to enable altjit.
201 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING_ITF)
202 endif (CLR_CMAKE_PLATFORM_ARCH_AMD64)
203 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
204 add_definitions(-DFEATURE_MULTIREG_RETURN)
205 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING)
206 endif (CLR_CMAKE_PLATFORM_UNIX_AMD64)
207 add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
208 if((CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) AND NOT WIN32)
209 add_definitions(-DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES)
210 add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
211 endif((CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM64) AND NOT WIN32)
213 add_definitions(-DFEATURE_VERSIONING_LOG)
215 if(NOT CLR_CMAKE_PLATFORM_UNIX)
216 add_definitions(-DFEATURE_WIN32_REGISTRY)
217 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
218 add_definitions(-DFEATURE_LEGACYNETCF_DBG_HOST_CONTROL)
219 add_definitions(-DFEATURE_WINDOWSPHONE)
220 add_definitions(-DFEATURE_WINMD_RESILIENT)
221 add_definitions(-D_SECURE_SCL=0)
222 add_definitions(-DUNICODE)
223 add_definitions(-D_UNICODE)