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 elseif (CLR_CMAKE_TARGET_ARCH_ARM)
31 if (CLR_CMAKE_PLATFORM_UNIX)
32 add_definitions(-DDBG_TARGET_ARM_UNIX)
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_PLATFORM_UNIX_AMD64)
52 add_definitions(-DUNIX_AMD64_ABI)
53 elseif (CLR_CMAKE_PLATFORM_UNIX_ARM)
54 add_definitions(-DUNIX_ARM_ABI)
57 endif(CLR_CMAKE_PLATFORM_UNIX)
59 add_definitions(-D_BLD_CLR)
60 add_definitions(-DDEBUGGING_SUPPORTED)
61 add_definitions(-DPROFILING_SUPPORTED)
64 add_definitions(-DWIN32)
65 add_definitions(-D_WIN32)
66 add_definitions(-DWINVER=0x0602)
67 add_definitions(-D_WIN32_WINNT=0x0602)
68 add_definitions(-DWIN32_LEAN_AND_MEAN=1)
69 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
70 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
71 # Only enable edit and continue on windows x86 and x64
72 # exclude Linux, arm & arm64
73 add_definitions(-DEnC_SUPPORTED)
74 endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
77 # Features - please keep them alphabetically sorted
79 add_definitions(-DFEATURE_APPDOMAIN_RESOURCE_MONITORING)
81 add_definitions(-DFEATURE_APPX)
83 if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_ARM64)
84 add_definitions(-DFEATURE_ARRAYSTUB_AS_IL)
87 add_definitions(-DFEATURE_ASYNC_IO)
88 add_definitions(-DFEATURE_BCL_FORMATTING)
89 add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
92 add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
93 add_definitions(-DFEATURE_COMINTEROP)
94 add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
95 add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
96 add_definitions(-DFEATURE_COMINTEROP_WINRT_MANAGED_ACTIVATION)
99 add_definitions(-DFEATURE_CORECLR)
100 if (CLR_CMAKE_PLATFORM_UNIX)
101 add_definitions(-DFEATURE_COREFX_GLOBALIZATION)
102 endif(CLR_CMAKE_PLATFORM_UNIX)
103 add_definitions(-DFEATURE_CORESYSTEM)
104 add_definitions(-DFEATURE_CORRUPTING_EXCEPTIONS)
105 if(CLR_CMAKE_PLATFORM_UNIX)
106 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
107 add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
108 endif(CLR_CMAKE_PLATFORM_UNIX)
109 if(FEATURE_EVENT_TRACE)
110 add_definitions(-DFEATURE_EVENT_TRACE=1)
111 endif(FEATURE_EVENT_TRACE)
112 if(CLR_CMAKE_PLATFORM_UNIX)
113 add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
114 endif(CLR_CMAKE_PLATFORM_UNIX)
115 add_definitions(-DFEATURE_EXCEPTIONDISPATCHINFO)
116 # NetBSD doesn't implement this feature
117 if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
118 add_definitions(-DFEATURE_HIJACK)
119 endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
120 add_definitions(-DFEATURE_HOST_ASSEMBLY_RESOLVER)
121 add_definitions(-DFEATURE_ICASTABLE)
122 if (CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
123 add_definitions(-DFEATURE_IMPLICIT_TLS)
124 set(FEATURE_IMPLICIT_TLS 1)
125 endif(CLR_CMAKE_PLATFORM_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
126 add_definitions(-DFEATURE_ISYM_READER)
127 add_definitions(-DFEATURE_LOADER_OPTIMIZATION)
128 if (NOT CLR_CMAKE_PLATFORM_UNIX)
129 add_definitions(-DFEATURE_MANAGED_ETW)
130 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
131 add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
132 add_definitions(-DFEATURE_MAIN_CLR_MODULE_USES_CORE_NAME)
133 add_definitions(-DFEATURE_MERGE_CULTURE_SUPPORT_AND_ENGINE)
135 if(CLR_CMAKE_TARGET_ARCH_ARM64)
136 # TODO_DJIT: Remove this as part of enabling cross-compiling standalone JIT binary.
137 if (NOT CLR_CMAKE_PLATFORM_UNIX)
138 set(FEATURE_MERGE_JIT_AND_ENGINE 1)
139 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
140 endif(CLR_CMAKE_TARGET_ARCH_ARM64)
142 if(FEATURE_MERGE_JIT_AND_ENGINE)
143 # Disable the following for UNIX altjit on Windows
144 add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
145 endif(FEATURE_MERGE_JIT_AND_ENGINE)
146 add_definitions(-DFEATURE_MULTICOREJIT)
147 add_definitions(-DFEATURE_NORM_IDNA_ONLY)
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) AND NOT CLR_CMAKE_TARGET_ARCH_ARM)
170 add_definitions(-DFEATURE_STUBS_AS_IL)
172 add_definitions(-DFEATURE_SVR_GC)
173 add_definitions(-DFEATURE_SYMDIFF)
174 add_definitions(-DFEATURE_SYNTHETIC_CULTURES)
175 if(CLR_CMAKE_PLATFORM_UNIX_AMD64)
176 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING)
177 add_definitions(-DFEATURE_UNIX_AMD64_STRUCT_PASSING_ITF)
178 endif (CLR_CMAKE_PLATFORM_UNIX_AMD64)
179 add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
180 if(CLR_CMAKE_PLATFORM_ARCH_AMD64 AND NOT WIN32)
181 add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
182 endif(CLR_CMAKE_PLATFORM_ARCH_AMD64 AND NOT WIN32)
183 add_definitions(-DFEATURE_VERSIONING)
185 add_definitions(-DFEATURE_VERSIONING_LOG)
187 if(NOT CLR_CMAKE_PLATFORM_UNIX)
188 add_definitions(-DFEATURE_WIN32_REGISTRY)
189 endif(NOT CLR_CMAKE_PLATFORM_UNIX)
190 add_definitions(-DFEATURE_WINDOWSPHONE)
191 add_definitions(-DFEATURE_WINMD_RESILIENT)
192 add_definitions(-D_SECURE_SCL=0)
193 add_definitions(-DUNICODE)
194 add_definitions(-D_UNICODE)