diff options
Diffstat (limited to 'src/vm/CMakeLists.txt')
-rw-r--r-- | src/vm/CMakeLists.txt | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt index 3895f710b0..4e6a523ba2 100644 --- a/src/vm/CMakeLists.txt +++ b/src/vm/CMakeLists.txt @@ -13,11 +13,15 @@ add_definitions(-D_UNICODE) if(CMAKE_CONFIGURATION_TYPES) # multi-configuration generator? foreach (Config DEBUG CHECKED) - set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${Config}>:WRITE_BARRIER_CHECK=1>) + if(NOT FEATURE_STANDALONE_GC_ONLY) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${Config}>:WRITE_BARRIER_CHECK=1>) + endif(NOT FEATURE_STANDALONE_GC_ONLY) endforeach (Config) else() if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED) - add_definitions(-DWRITE_BARRIER_CHECK=1) + if(NOT FEATURE_STANDALONE_GC_ONLY) + add_definitions(-DWRITE_BARRIER_CHECK=1) + endif(NOT FEATURE_STANDALONE_GC_ONLY) endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED) endif(CMAKE_CONFIGURATION_TYPES) @@ -117,6 +121,18 @@ set(VM_SOURCES_DAC_AND_WKS_COMMON zapsig.cpp ) +set( GC_SOURCES_DAC_AND_WKS_COMMON + ../gc/gcconfig.cpp + ../gc/gccommon.cpp + ../gc/gcscan.cpp + ../gc/gcsvr.cpp + ../gc/gcwks.cpp + ../gc/handletable.cpp + ../gc/handletablecore.cpp + ../gc/handletablescan.cpp + ../gc/objecthandle.cpp + ../gc/softwarewritewatch.cpp) + if(FEATURE_READYTORUN) list(APPEND VM_SOURCES_DAC_AND_WKS_COMMON readytoruninfo.cpp @@ -129,6 +145,9 @@ set(VM_SOURCES_DAC threaddebugblockinginfo.cpp ) +set(GC_SOURCES_DAC + ${GC_SOURCES_DAC_AND_WKS_COMMON}) + set(VM_SOURCES_WKS ${VM_SOURCES_DAC_AND_WKS_COMMON} appdomainnative.cpp @@ -177,7 +196,9 @@ set(VM_SOURCES_WKS finalizerthread.cpp frameworkexceptionloader.cpp gccover.cpp - gcenv.ee.cpp + gcenv.ee.static.cpp + gcenv.ee.common.cpp + gcenv.os.cpp gchelpers.cpp genmeth.cpp hosting.cpp @@ -239,12 +260,25 @@ set(VM_SOURCES_WKS ${VM_SOURCES_GDBJIT} ) +set(GC_SOURCES_WKS + ${GC_SOURCES_DAC_AND_WKS_COMMON} + ../gc/gchandletable.cpp + ../gc/gceesvr.cpp + ../gc/gceewks.cpp + ../gc/handletablecache.cpp) + if(FEATURE_EVENT_TRACE) list(APPEND VM_SOURCES_WKS eventtrace.cpp ) endif(FEATURE_EVENT_TRACE) +if(FEATURE_STANDALONE_GC) + list(APPEND VM_SOURCES_WKS + gcenv.ee.standalone.cpp + ) +endif(FEATURE_STANDALONE_GC) + if(NOT FEATURE_STANDALONE_GC) list(APPEND VM_SOURCES_WKS gcenv.os.cpp @@ -472,6 +506,22 @@ list(APPEND VM_SOURCES_DAC ${VM_SOURCES_DAC_AND_WKS_ARCH} ) +# The default option for FEATURE_STANDALONE_GC builds a standalone +# and non-standalone GC, linking the non-standalone GC into coreclr.dll. +# For testing purposes, FEATURE_STANDALONE_GC_ONLY instead only builds and +# links the non-standalone GC into coreclr.dll. +if (NOT FEATURE_STANDALONE_GC_ONLY) + list(APPEND VM_SOURCES_WKS + ${GC_SOURCES_WKS} + ) +endif(NOT FEATURE_STANDALONE_GC_ONLY) + +# The DAC does need GC sources in order to link correctly, even if +# it's not used. +list(APPEND VM_SOURCES_DAC + ${GC_SOURCES_DAC} +) + convert_to_absolute_path(VM_SOURCES_WKS ${VM_SOURCES_WKS}) convert_to_absolute_path(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARCH_ASM}) convert_to_absolute_path(VM_SOURCES_DAC ${VM_SOURCES_DAC}) |