1 if(WIN32 AND CLR_CMAKE_TARGET_ARCH_I386 AND BUILD_JIT32)
8 set(FEATURE_EVENT_TRACE 1)
10 if(CLR_CMAKE_PLATFORM_LINUX AND CLR_CMAKE_TARGET_ARCH_AMD64)
11 set(FEATURE_EVENT_TRACE 1)
14 if (CLR_CMAKE_TARGET_ARCH_AMD64)
15 if (CLR_CMAKE_PLATFORM_UNIX)
16 add_definitions(-DDBG_TARGET_AMD64_UNIX)
18 add_definitions(-D_TARGET_AMD64_=1)
19 add_definitions(-DDBG_TARGET_64BIT=1)
20 add_definitions(-DDBG_TARGET_AMD64=1)
21 add_definitions(-DDBG_TARGET_WIN64=1)
22 elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
23 if (CLR_CMAKE_PLATFORM_UNIX)
24 add_definitions(-DDBG_TARGET_ARM64_UNIX)
26 add_definitions(-D_TARGET_ARM64_=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 endif(CLR_CMAKE_PLATFORM_DARWIN)
56 if (CLR_CMAKE_TARGET_ARCH_AMD64)
57 add_definitions(-DUNIX_AMD64_ABI)
58 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
59 add_definitions(-DUNIX_ARM_ABI)
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
92 add_definitions(-DFEATURE_APPDOMAIN_RESOURCE_MONITORING)
94 add_definitions(-DFEATURE_APPX)
95 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_ARM64)
96 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
99 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
102 add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
105 add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
106 add_definitions(-DFEATURE_COMINTEROP)
107 add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
108 add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
109 add_definitions(-DFEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION)
112 add_definitions(-DFEATURE_CORECLR)
113 if (CLR_CMAKE_PLATFORM_UNIX)
114 add_definitions(-DFEATURE_COREFX_GLOBALIZATION)
115 endif(CLR_CMAKE_PLATFORM_UNIX)
116 add_definitions(-DFEATURE_CORESYSTEM)
117 add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
118 if(CLR_CMAKE_PLATFORM_UNIX AND (NOT CLR_CMAKE_PLATFORM_ANDROID))
119 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
120 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
121 endif(CLR_CMAKE_PLATFORM_UNIX AND (NOT CLR_CMAKE_PLATFORM_ANDROID))
122 if(FEATURE_EVENT_TRACE)
123 add_definitions(-DFEATURE_EVENT_TRACE=1)
124 endif(FEATURE_EVENT_TRACE)
125 add_definitions(-DFEATURE_PERFTRACING)
126 if(CLR_CMAKE_PLATFORM_UNIX)
127 add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
128 endif(CLR_CMAKE_PLATFORM_UNIX)
129 add_definitions(-DFEATURE_TIERED_COMPILATION)
130 # NetBSD doesn't implement this feature
131 if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
132 add_definitions(-DFEATURE_HIJACK)
133 endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
134 add_definitions(-DFEATURE_ICASTABLE)
135 if (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386))
136 add_definitions(-DFEATURE_INTEROP_DEBUGGING)
137 endif (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386))
138 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
139 add_definitions(-DFEATURE_IMPLICIT_TLS)
140 set(FEATURE_IMPLICIT_TLS 1)
141 endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
142 add_definitions(-DFEATURE_ISYM_READER)
143 add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
144 if (NOT CLR_CMAKE_PLATFORM_UNIX)
145 add_definitions(-DFEATURE_MANAGED_ETW)
146 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
147 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
149 if(FEATURE_MERGE_JIT_AND_ENGINE)
150 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
151 endif(FEATURE_MERGE_JIT_AND_ENGINE)
152 add_definitions(-DFEATURE_MULTICOREJIT)
153 if(CLR_CMAKE_PLATFORM_UNIX)
154 add_definitions(-DFEATURE_PAL)
155 add_definitions(-DFEATURE_PAL_SXS)
156 add_definitions(-DFEATURE_PAL_ANSI)
157 endif(CLR_CMAKE_PLATFORM_UNIX)
158 if(CLR_CMAKE_PLATFORM_LINUX)
159 add_definitions(-DFEATURE_PERFMAP)
160 endif(CLR_CMAKE_PLATFORM_LINUX)
161 add_definitions(-DFEATURE_PREJIT)
162 add_definitions(-DFEATURE_RANDOMIZED_STRING_HASHING)
164 add_definitions(-DFEATURE_READYTORUN)
165 set(FEATURE_READYTORUN 1)
167 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
168 add_definitions(-DFEATURE_REJIT)
169 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
171 add_definitions(-DFEATURE_STANDALONE_SN)
172 add_definitions(-DFEATURE_STRONGNAME_DELAY_SIGNING_ALLOWED)
173 add_definitions(-DFEATURE_STRONGNAME_MIGRATION)
174 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
175 add_definitions(-DFEATURE_STUBS_AS_IL)
177 add_definitions(-DFEATURE_SVR_GC)
178 add_definitions(-DFEATURE_SYMDIFF)
179 if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
180 # Enable the AMD64 Unix struct passing JIT-EE interface for all AMD64 platforms, to enable altjit.
181 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING_ITF)
182 endif (CLR_CMAKE_PLATFORM_ARCH_AMD64)
183 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
184 add_definitions(-DFEATURE_MULTIREG_RETURN)
185 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING)
186 endif (CLR_CMAKE_PLATFORM_UNIX_AMD64)
187 add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
188 if(CLR_CMAKE_PLATFORM_ARCH_AMD64 AND NOT WIN32)
189 add_definitions(-DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES)
190 add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
191 endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 AND NOT WIN32)
193 add_definitions(-DFEATURE_VERSIONING_LOG)
195 if(NOT CLR_CMAKE_PLATFORM_UNIX)
196 add_definitions(-DFEATURE_WIN32_REGISTRY)
197 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
198 add_definitions(-DFEATURE_LEGACYNETCF_DBG_HOST_CONTROL)
199 add_definitions(-DFEATURE_WINDOWSPHONE)
200 add_definitions(-DFEATURE_WINMD_RESILIENT)
201 add_definitions(-D_SECURE_SCL=0)
202 add_definitions(-DUNICODE)
203 add_definitions(-D_UNICODE)