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 if(CLR_CMAKE_PLATFORM_UNIX)
126 add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
127 endif(CLR_CMAKE_PLATFORM_UNIX)
128 # NetBSD doesn't implement this feature
129 if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
130 add_definitions(-DFEATURE_HIJACK)
131 endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
132 add_definitions(-DFEATURE_ICASTABLE)
133 if (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386))
134 add_definitions(-DFEATURE_INTEROP_DEBUGGING)
135 endif (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386))
136 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
137 add_definitions(-DFEATURE_IMPLICIT_TLS)
138 set(FEATURE_IMPLICIT_TLS 1)
139 endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
140 add_definitions(-DFEATURE_ISYM_READER)
141 add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
142 if (NOT CLR_CMAKE_PLATFORM_UNIX)
143 add_definitions(-DFEATURE_MANAGED_ETW)
144 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
145 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
147 if(FEATURE_MERGE_JIT_AND_ENGINE)
148 # Disable the following for UNIX altjit on Windows
149 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
150 endif(FEATURE_MERGE_JIT_AND_ENGINE)
151 add_definitions(-DFEATURE_MULTICOREJIT)
152 if(CLR_CMAKE_PLATFORM_UNIX)
153 add_definitions(-DFEATURE_PAL)
154 add_definitions(-DFEATURE_PAL_SXS)
155 add_definitions(-DFEATURE_PAL_ANSI)
156 endif(CLR_CMAKE_PLATFORM_UNIX)
157 if(CLR_CMAKE_PLATFORM_LINUX)
158 add_definitions(-DFEATURE_PERFMAP)
159 endif(CLR_CMAKE_PLATFORM_LINUX)
160 add_definitions(-DFEATURE_PREJIT)
161 add_definitions(-DFEATURE_RANDOMIZED_STRING_HASHING)
163 add_definitions(-DFEATURE_READYTORUN)
164 set(FEATURE_READYTORUN 1)
166 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
167 add_definitions(-DFEATURE_REJIT)
168 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
170 add_definitions(-DFEATURE_STANDALONE_SN)
171 add_definitions(-DFEATURE_STRONGNAME_DELAY_SIGNING_ALLOWED)
172 add_definitions(-DFEATURE_STRONGNAME_MIGRATION)
173 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
174 add_definitions(-DFEATURE_STUBS_AS_IL)
176 add_definitions(-DFEATURE_SVR_GC)
177 add_definitions(-DFEATURE_SYMDIFF)
178 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
179 add_definitions(-DFEATURE_MULTIREG_RETURN)
180 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING)
181 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING_ITF)
182 endif (CLR_CMAKE_PLATFORM_UNIX_AMD64)
183 add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
184 if(CLR_CMAKE_PLATFORM_ARCH_AMD64 AND NOT WIN32)
185 add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
186 endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 AND NOT WIN32)
188 add_definitions(-DFEATURE_VERSIONING_LOG)
190 if(NOT CLR_CMAKE_PLATFORM_UNIX)
191 add_definitions(-DFEATURE_WIN32_REGISTRY)
192 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
193 add_definitions(-DFEATURE_LEGACYNETCF_DBG_HOST_CONTROL)
194 add_definitions(-DFEATURE_WINDOWSPHONE)
195 add_definitions(-DFEATURE_WINMD_RESILIENT)
196 add_definitions(-D_SECURE_SCL=0)
197 add_definitions(-DUNICODE)
198 add_definitions(-D_UNICODE)