11set (CMAKE_INCLUDE_CURRENT_DIR ON )
22
3- # Local GC meta-issue: https://github.com/dotnet/runtime/issues/8061
4-
5- # https://github.com/dotnet/runtime/issues/8059
6- remove_definitions (-DSTRESS_HEAP)
7-
8- # https://github.com/dotnet/runtime/issues/8062
9- remove_definitions (-DWRITE_BARRIER_CHECK)
3+ if (FEATURE_STANDALONE_GC)
4+ add_definitions (-DFEATURE_STANDALONE_GC)
5+ remove_definitions (-DSTRESS_HEAP)
6+ remove_definitions (-DWRITE_BARRIER_CHECK)
7+ endif (FEATURE_STANDALONE_GC)
108
119set (GC_SOURCES
1210 gceventstatus.cpp
@@ -100,37 +98,39 @@ list(APPEND GC_SOURCES ${GC_HEADERS})
10098
10199convert_to_absolute_path(GC_SOURCES ${GC_SOURCES} )
102100
103- # clrgcexp is build with standalone+regions
104- if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
105- add_library_clr(clrgcexp SHARED ${GC_SOURCES} )
106- add_dependencies (clrgcexp eventing_headers)
107- target_link_libraries (clrgcexp PRIVATE ${GC_LINK_LIBRARIES} )
108- target_compile_definitions (clrgcexp PRIVATE -DUSE_REGIONS)
109- install_clr(TARGETS clrgcexp DESTINATIONS . COMPONENT runtime)
110- endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
111-
112- # clrgc is build with standalone+segments
113- add_library_clr(clrgc SHARED ${GC_SOURCES} )
114- add_dependencies (clrgc eventing_headers)
115- target_link_libraries (clrgc PRIVATE ${GC_LINK_LIBRARIES} )
116- install_clr(TARGETS clrgc DESTINATIONS . COMPONENT runtime)
117-
118- add_definitions (-DBUILD_AS_STANDALONE)
119- add_definitions (-DFEATURE_CONSERVATIVE_GC)
120-
121- add_definitions (-DFX_VER_INTERNALNAME_STR=clrgc.dll)
122- add_definitions (-DVERIFY_HEAP)
123- if (CLR_CMAKE_HOST_APPLE)
124- # The implementation of GCToOSInterface on Apple platforms makes use of non-POSIX
125- # pthreads APIs, which by default are not included in the pthreads header
126- # unless we define this macro.
127- add_definitions (-D_DARWIN_C_SOURCE)
128- endif (CLR_CMAKE_HOST_APPLE)
129-
130- include_directories (${CMAKE_CURRENT_SOURCE_DIR} )
131- include_directories (${CMAKE_CURRENT_SOURCE_DIR} /env)
132-
133- install_clr(TARGETS clrgc DESTINATIONS . sharedFramework COMPONENT runtime)
134- if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
135- install_clr(TARGETS clrgcexp DESTINATIONS . sharedFramework COMPONENT runtime)
136- endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
101+ if (FEATURE_STANDALONE_GC)
102+ # clrgcexp is build with standalone+regions
103+ if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
104+ add_library_clr(clrgcexp SHARED ${GC_SOURCES} )
105+ add_dependencies (clrgcexp eventing_headers)
106+ target_link_libraries (clrgcexp PRIVATE ${GC_LINK_LIBRARIES} )
107+ target_compile_definitions (clrgcexp PRIVATE -DUSE_REGIONS)
108+ install_clr(TARGETS clrgcexp DESTINATIONS . COMPONENT runtime)
109+ endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
110+
111+ # clrgc is build with standalone+segments
112+ add_library_clr(clrgc SHARED ${GC_SOURCES} )
113+ add_dependencies (clrgc eventing_headers)
114+ target_link_libraries (clrgc PRIVATE ${GC_LINK_LIBRARIES} )
115+ install_clr(TARGETS clrgc DESTINATIONS . COMPONENT runtime)
116+
117+ add_definitions (-DBUILD_AS_STANDALONE)
118+ add_definitions (-DFEATURE_CONSERVATIVE_GC)
119+
120+ add_definitions (-DFX_VER_INTERNALNAME_STR=clrgc.dll)
121+ add_definitions (-DVERIFY_HEAP)
122+ if (CLR_CMAKE_HOST_APPLE)
123+ # The implementation of GCToOSInterface on Apple platforms makes use of non-POSIX
124+ # pthreads APIs, which by default are not included in the pthreads header
125+ # unless we define this macro.
126+ add_definitions (-D_DARWIN_C_SOURCE)
127+ endif (CLR_CMAKE_HOST_APPLE)
128+
129+ include_directories (${CMAKE_CURRENT_SOURCE_DIR} )
130+ include_directories (${CMAKE_CURRENT_SOURCE_DIR} /env)
131+
132+ install_clr(TARGETS clrgc DESTINATIONS . sharedFramework COMPONENT runtime)
133+ if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
134+ install_clr(TARGETS clrgcexp DESTINATIONS . sharedFramework COMPONENT runtime)
135+ endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
136+ endif (FEATURE_STANDALONE_GC)
0 commit comments