1 if(WIN32 AND CLR_CMAKE_TARGET_ARCH_I386 AND BUILD_JIT32)
7 include(clrfeatures.cmake)
9 if (CLR_CMAKE_TARGET_ARCH_AMD64)
10 if (CLR_CMAKE_PLATFORM_UNIX)
11 add_definitions(-DDBG_TARGET_AMD64_UNIX)
13 add_definitions(-D_TARGET_AMD64_=1)
14 add_definitions(-DDBG_TARGET_64BIT=1)
15 add_definitions(-DDBG_TARGET_AMD64=1)
16 add_definitions(-DDBG_TARGET_WIN64=1)
17 elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
18 if (CLR_CMAKE_PLATFORM_UNIX)
19 add_definitions(-DDBG_TARGET_ARM64_UNIX)
21 add_definitions(-D_TARGET_ARM64_=1)
22 add_definitions(-DDBG_TARGET_64BIT=1)
23 add_definitions(-DDBG_TARGET_ARM64=1)
24 add_definitions(-DDBG_TARGET_WIN64=1)
25 add_definitions(-DFEATURE_MULTIREG_RETURN)
26 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
27 if (CLR_CMAKE_PLATFORM_UNIX)
28 add_definitions(-DDBG_TARGET_ARM_UNIX)
29 elseif (WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
30 # Set this to ensure we can use Arm SDK for Desktop binary linkage when doing native (Arm32) build
31 add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1)
32 add_definitions(-D_ARM_WORKAROUND_)
33 endif (CLR_CMAKE_PLATFORM_UNIX)
34 add_definitions(-D_TARGET_ARM_=1)
35 add_definitions(-DDBG_TARGET_32BIT=1)
36 add_definitions(-DDBG_TARGET_ARM=1)
37 elseif (CLR_CMAKE_TARGET_ARCH_I386)
38 add_definitions(-D_TARGET_X86_=1)
39 add_definitions(-DDBG_TARGET_32BIT=1)
40 add_definitions(-DDBG_TARGET_X86=1)
43 endif (CLR_CMAKE_TARGET_ARCH_AMD64)
45 if (CLR_CMAKE_PLATFORM_UNIX)
47 if(CLR_CMAKE_PLATFORM_DARWIN)
48 add_definitions(-D_XOPEN_SOURCE)
49 endif(CLR_CMAKE_PLATFORM_DARWIN)
51 if (CLR_CMAKE_TARGET_ARCH_AMD64)
52 add_definitions(-DUNIX_AMD64_ABI)
53 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
54 add_definitions(-DUNIX_ARM_ABI)
55 elseif (CLR_CMAKE_TARGET_ARCH_I386)
56 add_definitions(-DUNIX_X86_ABI)
59 endif(CLR_CMAKE_PLATFORM_UNIX)
61 if(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
62 # Alpine Linux doesn't have fixed stack limit, this define disables some stack pointer
63 # sanity checks in debug / checked build that rely on a fixed stack limit
64 add_definitions(-DNO_FIXED_STACK_LIMIT)
65 endif(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
67 add_definitions(-D_BLD_CLR)
68 add_definitions(-DDEBUGGING_SUPPORTED)
69 add_definitions(-DPROFILING_SUPPORTED)
72 add_definitions(-DWIN32)
73 add_definitions(-D_WIN32)
74 add_definitions(-DWINVER=0x0602)
75 add_definitions(-D_WIN32_WINNT=0x0602)
76 add_definitions(-DWIN32_LEAN_AND_MEAN=1)
77 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
78 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
79 # Only enable edit and continue on windows x86 and x64
80 # exclude Linux, arm & arm64
81 add_definitions(-DEnC_SUPPORTED)
82 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
85 # Features - please keep them alphabetically sorted
87 add_definitions(-DFEATURE_APPDOMAIN_RESOURCE_MONITORING)
89 add_definitions(-DFEATURE_APPX)
90 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_ARM64)
91 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
94 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
97 add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
100 add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
101 add_definitions(-DFEATURE_COMINTEROP)
102 add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
103 add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
104 add_definitions(-DFEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION)
107 add_definitions(-DFEATURE_CORECLR)
108 if (CLR_CMAKE_PLATFORM_UNIX)
109 add_definitions(-DFEATURE_COREFX_GLOBALIZATION)
110 endif(CLR_CMAKE_PLATFORM_UNIX)
111 add_definitions(-DFEATURE_CORESYSTEM)
112 add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
114 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
115 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
116 endif(FEATURE_DBGIPC)
117 if(FEATURE_EVENT_TRACE)
118 add_definitions(-DFEATURE_EVENT_TRACE=1)
119 endif(FEATURE_EVENT_TRACE)
120 add_definitions(-DFEATURE_PERFTRACING)
121 if(CLR_CMAKE_PLATFORM_UNIX)
122 add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
123 endif(CLR_CMAKE_PLATFORM_UNIX)
124 add_definitions(-DFEATURE_TIERED_COMPILATION)
125 # NetBSD doesn't implement this feature
126 if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
127 add_definitions(-DFEATURE_HIJACK)
128 endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
129 add_definitions(-DFEATURE_ICASTABLE)
130 if (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386))
131 add_definitions(-DFEATURE_INTEROP_DEBUGGING)
132 endif (WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386))
133 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
134 add_definitions(-DFEATURE_IMPLICIT_TLS)
135 set(FEATURE_IMPLICIT_TLS 1)
136 endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
137 add_definitions(-DFEATURE_ISYM_READER)
138 add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
139 if (NOT CLR_CMAKE_PLATFORM_UNIX)
140 add_definitions(-DFEATURE_MANAGED_ETW)
141 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
142 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
144 if(FEATURE_MERGE_JIT_AND_ENGINE)
145 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
146 endif(FEATURE_MERGE_JIT_AND_ENGINE)
147 add_definitions(-DFEATURE_MULTICOREJIT)
148 if(CLR_CMAKE_PLATFORM_UNIX)
149 add_definitions(-DFEATURE_PAL)
150 add_definitions(-DFEATURE_PAL_SXS)
151 add_definitions(-DFEATURE_PAL_ANSI)
152 endif(CLR_CMAKE_PLATFORM_UNIX)
153 if(CLR_CMAKE_PLATFORM_LINUX)
154 add_definitions(-DFEATURE_PERFMAP)
155 endif(CLR_CMAKE_PLATFORM_LINUX)
156 add_definitions(-DFEATURE_PREJIT)
157 add_definitions(-DFEATURE_RANDOMIZED_STRING_HASHING)
159 add_definitions(-DFEATURE_READYTORUN)
160 set(FEATURE_READYTORUN 1)
162 if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
163 add_definitions(-DFEATURE_REJIT)
164 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
166 add_definitions(-DFEATURE_STANDALONE_SN)
167 add_definitions(-DFEATURE_STRONGNAME_DELAY_SIGNING_ALLOWED)
168 add_definitions(-DFEATURE_STRONGNAME_MIGRATION)
169 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
170 add_definitions(-DFEATURE_STUBS_AS_IL)
172 add_definitions(-DFEATURE_SVR_GC)
173 add_definitions(-DFEATURE_SYMDIFF)
174 if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
175 # Enable the AMD64 Unix struct passing JIT-EE interface for all AMD64 platforms, to enable altjit.
176 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING_ITF)
177 endif (CLR_CMAKE_PLATFORM_ARCH_AMD64)
178 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
179 add_definitions(-DFEATURE_MULTIREG_RETURN)
180 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING)
181 endif (CLR_CMAKE_PLATFORM_UNIX_AMD64)
182 add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
183 if(CLR_CMAKE_PLATFORM_ARCH_AMD64 AND NOT WIN32)
184 add_definitions(-DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES)
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)