Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete CMake infrastructure for crossgen1 and remove dead code directories #57614

Merged
merged 9 commits into from
Aug 18, 2021
18 changes: 0 additions & 18 deletions src/coreclr/binder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,11 @@ set(BINDER_HEADERS
inc/contextentry.hpp
)

set(BINDER_CROSSGEN_SOURCES
${BINDER_COMMON_SOURCES}
)

set(BINDER_CROSSGEN_HEADERS
${BINDER_COMMON_HEADERS}
)

if (CLR_CMAKE_TARGET_WIN32)
list(APPEND BINDER_SOURCES ${BINDER_HEADERS})
list(APPEND BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_HEADERS})
endif(CLR_CMAKE_TARGET_WIN32)

convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})

add_library_clr(v3binder_obj
OBJECT
Expand All @@ -84,11 +74,3 @@ add_library_clr(v3binder_obj
add_dependencies(v3binder_obj eventing_headers)
add_library(v3binder INTERFACE)
target_sources(v3binder INTERFACE $<TARGET_OBJECTS:v3binder_obj>)

add_library_clr(v3binder_crossgen
STATIC
${BINDER_CROSSGEN_SOURCES}
)
add_dependencies(v3binder_crossgen eventing_headers)
set_target_properties(v3binder_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)

37 changes: 12 additions & 25 deletions src/coreclr/clrdefinitions.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
include(${CMAKE_CURRENT_LIST_DIR}/clrfeatures.cmake)

add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>:DACCESS_COMPILE>)
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>:CROSSGEN_COMPILE>)
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>:CROSS_COMPILE>)
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>:FEATURE_NATIVE_IMAGE_GENERATION>)
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>:SELF_NO_HOST>)

if (CLR_CMAKE_TARGET_ARCH_ARM64)
if (CLR_CMAKE_TARGET_UNIX)
Expand Down Expand Up @@ -58,11 +54,11 @@ if(CLR_CMAKE_HOST_WIN32)
endif(CLR_CMAKE_HOST_WIN32)

if (NOT (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_UNIX))
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:EnC_SUPPORTED>)
add_compile_definitions(EnC_SUPPORTED)
endif()
if(CLR_CMAKE_TARGET_ARCH_AMD64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_WIN32))
if(CLR_CMAKE_TARGET_WIN32)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_ENC_SUPPORTED>)
add_compile_definitions(FEATURE_ENC_SUPPORTED)
endif(CLR_CMAKE_TARGET_WIN32)
endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_WIN32))

Expand All @@ -85,7 +81,7 @@ if(CLR_CMAKE_TARGET_UNIX OR NOT CLR_CMAKE_TARGET_ARCH_I386)
add_definitions(-DFEATURE_INSTANTIATINGSTUB_AS_IL)
endif()

add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_CODE_VERSIONING>)
add_compile_definitions(FEATURE_CODE_VERSIONING)
add_definitions(-DFEATURE_COLLECTIBLE_TYPES)

if(CLR_CMAKE_TARGET_WIN32)
Expand All @@ -103,7 +99,7 @@ if(FEATURE_DBGIPC)
endif(FEATURE_DBGIPC)
add_definitions(-DFEATURE_DEFAULT_INTERFACES)
if(FEATURE_EVENT_TRACE)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_EVENT_TRACE>)
add_compile_definitions(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_PERFTRACING)
else(FEATURE_EVENT_TRACE)
add_custom_target(eventing_headers) # add a dummy target to avoid checking for FEATURE_EVENT_TRACE in multiple places
Expand Down Expand Up @@ -132,7 +128,7 @@ if (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_
add_definitions(-DFEATURE_INTEROP_DEBUGGING)
endif (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
if(FEATURE_INTERPRETER)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_INTERPRETER>)
add_compile_definitions(FEATURE_INTERPRETER)
endif(FEATURE_INTERPRETER)
add_definitions(-DFEATURE_ISYM_READER)
if (CLR_CMAKE_TARGET_LINUX OR CLR_CMAKE_TARGET_WIN32)
Expand All @@ -143,21 +139,16 @@ add_definitions(-DFEATURE_MANAGED_ETW_CHANNELS)
if(FEATURE_MERGE_JIT_AND_ENGINE)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_FEATURE_MERGE_JIT_AND_ENGINE>>>:FEATURE_MERGE_JIT_AND_ENGINE>)
endif(FEATURE_MERGE_JIT_AND_ENGINE)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_MULTICOREJIT>)
add_compile_definitions(FEATURE_MULTICOREJIT)
if(CLR_CMAKE_TARGET_UNIX)
add_definitions(-DFEATURE_PAL_ANSI)
endif(CLR_CMAKE_TARGET_UNIX)
if(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_HOST_LINUX)
add_definitions(-DFEATURE_PERFMAP)
endif(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_HOST_LINUX)
if(CLR_CMAKE_TARGET_FREEBSD)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_PERFMAP>)
add_compile_definitions(FEATURE_PERFMAP)
endif(CLR_CMAKE_TARGET_FREEBSD)
if(FEATURE_PREJIT)
add_definitions(-DFEATURE_PREJIT)
else()
add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>:FEATURE_PREJIT>)
endif(FEATURE_PREJIT)

if(FEATURE_COMWRAPPERS)
add_compile_definitions(FEATURE_COMWRAPPERS)
Expand All @@ -167,14 +158,13 @@ if(FEATURE_OBJCMARSHAL)
add_compile_definitions(FEATURE_OBJCMARSHAL)
endif()

add_compile_definitions($<$<AND:$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>,$<NOT:$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>>>:FEATURE_PROFAPI_ATTACH_DETACH>)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>>:FEATURE_PROFAPI_ATTACH_DETACH>)

add_definitions(-DFEATURE_READYTORUN)

add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>:FEATURE_READYTORUN_COMPILER>)
set(FEATURE_READYTORUN 1)

add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_REJIT>)
add_compile_definitions(FEATURE_REJIT)

if (CLR_CMAKE_HOST_UNIX AND CLR_CMAKE_TARGET_UNIX)
add_definitions(-DFEATURE_REMOTE_PROC_MEM)
Expand All @@ -183,19 +173,16 @@ endif (CLR_CMAKE_HOST_UNIX AND CLR_CMAKE_TARGET_UNIX)
if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
add_definitions(-DFEATURE_STUBS_AS_IL)
endif ()
if (FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
add_definitions(-DFEATURE_NGEN_RELOCS_OPTIMIZATIONS)
endif(FEATURE_NGEN_RELOCS_OPTIMIZATIONS)
if (FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
add_definitions(-DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
endif(FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
add_definitions(-DFEATURE_SVR_GC)
add_definitions(-DFEATURE_SYMDIFF)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_TIERED_COMPILATION>)
add_compile_definitions(FEATURE_TIERED_COMPILATION)
if (CLR_CMAKE_TARGET_ARCH_AMD64)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_ON_STACK_REPLACEMENT>)
add_compile_definitions(FEATURE_ON_STACK_REPLACEMENT)
endif (CLR_CMAKE_TARGET_ARCH_AMD64)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:CROSSGEN_COMPONENT>>>:FEATURE_PGO>)
add_compile_definitions(FEATURE_PGO)
if (CLR_CMAKE_TARGET_WIN32)
add_definitions(-DFEATURE_TYPEEQUIVALENCE)
endif(CLR_CMAKE_TARGET_WIN32)
Expand Down
7 changes: 0 additions & 7 deletions src/coreclr/gcinfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ add_library_clr(gcinfo_obj
add_library(gcinfo INTERFACE)
target_sources(gcinfo INTERFACE $<TARGET_OBJECTS:gcinfo_obj>)

add_library_clr(gcinfo_crossgen
STATIC
${GCINFO_SOURCES}
)

set_target_properties(gcinfo_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)

install (FILES gcinfoencoder.cpp
DESTINATION gcinfo)

Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,6 @@ endfunction()

set(JIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

if (FEATURE_MERGE_JIT_AND_ENGINE)
add_subdirectory(crossgen)
endif (FEATURE_MERGE_JIT_AND_ENGINE)

# Creates a static library "clrjit_static" to link into the VM.
add_subdirectory(static)

Expand Down
6 changes: 0 additions & 6 deletions src/coreclr/jit/crossgen/CMakeLists.txt

This file was deleted.

4 changes: 0 additions & 4 deletions src/coreclr/md/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ add_library_clr(mdcompiler-dbi ${MDCOMPILER_SOURCES})
set_target_properties(mdcompiler-dbi PROPERTIES DBI_COMPONENT TRUE)
target_precompile_headers(mdcompiler-dbi PRIVATE stdafx.h)

add_library_clr(mdcompiler_crossgen ${MDCOMPILER_SOURCES})
set_target_properties(mdcompiler_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
target_precompile_headers(mdcompiler_crossgen PRIVATE stdafx.h)

add_library_clr(mdcompiler_ppdb ${MDCOMPILER_SOURCES})
target_compile_definitions(mdcompiler_ppdb PRIVATE FEATURE_METADATA_EMIT_ALL FEATURE_METADATA_EMIT_PORTABLE_PDB)
target_precompile_headers(mdcompiler_ppdb PRIVATE stdafx.h)
4 changes: 0 additions & 4 deletions src/coreclr/md/hotdata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ target_precompile_headers(mdhotdata_full_obj PRIVATE external.h)
add_library(mdhotdata_full INTERFACE)
target_sources(mdhotdata_full INTERFACE $<TARGET_OBJECTS:mdhotdata_full_obj>)

add_library_clr(mdhotdata_crossgen ${MDHOTDATA_SOURCES})
set_target_properties(mdhotdata_crossgen PROPERTIES CROSSGEN_COMPONENT TRUE)
target_precompile_headers(mdhotdata_crossgen PRIVATE external.h)

if(CLR_CMAKE_HOST_WIN32)
add_library_clr(mdhotdata-staticcrt ${MDHOTDATA_SOURCES})
target_precompile_headers(mdhotdata-staticcrt PRIVATE external.h)
Expand Down
83 changes: 0 additions & 83 deletions src/coreclr/tools/crossgen/CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions src/coreclr/tools/crossgen/Native.rc

This file was deleted.

Loading