diff options
Diffstat (limited to 'src/dlls/mscoree/coreclr/CMakeLists.txt')
-rw-r--r-- | src/dlls/mscoree/coreclr/CMakeLists.txt | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/dlls/mscoree/coreclr/CMakeLists.txt index 55096acea9..17f4daf85a 100644 --- a/src/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/dlls/mscoree/coreclr/CMakeLists.txt @@ -1,38 +1,37 @@ if (WIN32) -preprocess_def_file(${DEF_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def) + preprocess_def_file(${DEF_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def) -list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def) + list(APPEND CLR_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def) -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ENTRY:CoreDllMain") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ENTRY:CoreDllMain") -# No library groups for Win32 -set(START_LIBRARY_GROUP) -set(END_LIBRARY_GROUP) + # No library groups for Win32 + set(START_LIBRARY_GROUP) + set(END_LIBRARY_GROUP) else() + add_definitions(-DNO_CRT_INIT) -add_definitions(-DNO_CRT_INIT) + if(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD) + # This option is necessary to ensure that the overloaded delete operator defined inside + # of the utilcode will be used instead of the standard library delete operator. + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions") -if(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD) -# This option is necessary to ensure that the overloaded delete operator defined inside -# of the utilcode will be used instead of the standard library delete operator. - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic-functions") + # The following linked options can be inserted into the linker libraries list to + # ensure proper resolving of circular references between a subset of the libraries. + set(START_LIBRARY_GROUP -Wl,--start-group) + set(END_LIBRARY_GROUP -Wl,--end-group) -# The following linked options can be inserted into the linker libraries list to -# ensure proper resolving of circular references between a subset of the libraries. - set(START_LIBRARY_GROUP -Wl,--start-group) - set(END_LIBRARY_GROUP -Wl,--end-group) + # These options are used to force every object to be included even if it's unused. + set(START_WHOLE_ARCHIVE -Wl,--whole-archive) + set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive) + endif(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD) -# These options are used to force every object to be included even if it's unused. - set(START_WHOLE_ARCHIVE -Wl,--whole-archive) - set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive) -endif(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD) - -if(CMAKE_SYSTEM_NAME STREQUAL Darwin) -# These options are used to force every object to be included even if it's unused. - set(START_WHOLE_ARCHIVE -force_load) - set(END_WHOLE_ARCHIVE ) -endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) + if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + # These options are used to force every object to be included even if it's unused. + set(START_WHOLE_ARCHIVE -force_load) + set(END_WHOLE_ARCHIVE ) + endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) endif (WIN32) @@ -44,7 +43,7 @@ add_library(coreclr ) if (CLR_CMAKE_PLATFORM_UNIX) -set(LIB_UNWINDER unwinder_wks) + set(LIB_UNWINDER unwinder_wks) endif (CLR_CMAKE_PLATFORM_UNIX) # IMPORTANT! Please do not rearrange the order of the libraries. The linker on Linux is |