diff options
author | Mike Danes <onemihaid@hotmail.com> | 2015-12-12 15:12:10 +0200 |
---|---|---|
committer | Mike Danes <onemihaid@hotmail.com> | 2015-12-13 00:06:09 +0200 |
commit | d9604b22438b263077e180156160456418935a42 (patch) | |
tree | 26939517913d7f005d8d44aa2a368e6dd595aba7 /src/utilcode | |
parent | ade2cc7a51171c0ba264ecd72c7351d8bbda457f (diff) | |
download | coreclr-d9604b22438b263077e180156160456418935a42.tar.gz coreclr-d9604b22438b263077e180156160456418935a42.tar.bz2 coreclr-d9604b22438b263077e180156160456418935a42.zip |
Remove unnecessary files from build and disable LNK4221
Some files have their contents ifdefed out because some CLR features
(remoting, CAS, fusion etc.) are not present (and they'll probably never
be) in CoreCLR. A few others are DAC, CrossGen or arch specific so they
have been moved to the appropiate file lists.
Diffstat (limited to 'src/utilcode')
-rw-r--r-- | src/utilcode/CMakeLists.txt | 47 | ||||
-rw-r--r-- | src/utilcode/crossgen/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/utilcode/dac/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/utilcode/staticnohost/CMakeLists.txt | 8 |
4 files changed, 45 insertions, 26 deletions
diff --git a/src/utilcode/CMakeLists.txt b/src/utilcode/CMakeLists.txt index 52a017fd21..e452da8825 100644 --- a/src/utilcode/CMakeLists.txt +++ b/src/utilcode/CMakeLists.txt @@ -5,7 +5,7 @@ if(WIN32) add_compile_options(/wd4996) endif(WIN32) -set(UTILCODE_SOURCES +set(UTILCODE_COMMON_SOURCES clrhost_nodependencies.cpp ccomprc.cpp ex.cpp @@ -16,16 +16,13 @@ set(UTILCODE_SOURCES makepath.cpp splitpath.cpp clrconfig.cpp - registrywrapper.cpp collections.cpp - genericstackprobe.cpp posterror.cpp fstream.cpp clrhelpers.cpp stgpool.cpp stgpooli.cpp stgpoolreadonly.cpp - lazycow.cpp utsem.cpp peinformation.cpp check.cpp @@ -38,10 +35,8 @@ set(UTILCODE_SOURCES guidfromname.cpp jitperf.cpp memorypool.cpp - rangetree.cpp iallocator.cpp loaderheap.cpp - perflog.cpp outstring.cpp ilformatter.cpp opinfo.cpp @@ -71,20 +66,55 @@ set(UTILCODE_SOURCES # They should be moved out from here into the declaration # of UTILCODE_SOURCES above after fixing compiler errors. if(WIN32) - list(APPEND UTILCODE_SOURCES + list(APPEND UTILCODE_COMMON_SOURCES appxutil.cpp dlwrap.cpp downlevel.cpp loadrc.cpp newapis.cpp - tls.cpp securitywrapper.cpp securityutil.cpp stacktrace.cpp ) + + if(CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_ARM) + list(APPEND UTILCODE_COMMON_SOURCES + lazycow.cpp + ) + endif() endif(WIN32) +set(UTILCODE_SOURCES + ${UTILCODE_COMMON_SOURCES} + perflog.cpp +) + +if(WIN32) + list(APPEND UTILCODE_SOURCES + tls.cpp + ) +endif() + +set(UTILCODE_DAC_SOURCES + ${UTILCODE_COMMON_SOURCES} + hostimpl.cpp +) + +set(UTILCODE_CROSSGEN_SOURCES + ${UTILCODE_COMMON_SOURCES} + hostimpl.cpp + perflog.cpp +) + +set(UTILCODE_STATICNOHOST_SOURCES + ${UTILCODE_COMMON_SOURCES} + hostimpl.cpp +) + convert_to_absolute_path(UTILCODE_SOURCES ${UTILCODE_SOURCES}) +convert_to_absolute_path(UTILCODE_DAC_SOURCES ${UTILCODE_DAC_SOURCES}) +convert_to_absolute_path(UTILCODE_CROSSGEN_SOURCES ${UTILCODE_CROSSGEN_SOURCES}) +convert_to_absolute_path(UTILCODE_STATICNOHOST_SOURCES ${UTILCODE_STATICNOHOST_SOURCES}) if(CLR_CMAKE_PLATFORM_UNIX) add_compile_options(-fPIC) @@ -94,4 +124,3 @@ add_subdirectory(dac) add_subdirectory(dyncrt) add_subdirectory(staticnohost) add_subdirectory(crossgen) - diff --git a/src/utilcode/crossgen/CMakeLists.txt b/src/utilcode/crossgen/CMakeLists.txt index 70981e3214..50c9927ca8 100644 --- a/src/utilcode/crossgen/CMakeLists.txt +++ b/src/utilcode/crossgen/CMakeLists.txt @@ -1,11 +1,7 @@ include(${CLR_DIR}/crossgen.cmake) -list(APPEND UTILCODE_SOURCES - ../hostimpl.cpp -) - -add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES) -add_library(utilcode_crossgen STATIC ${UTILCODE_SOURCES}) +add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_CROSSGEN_SOURCES) +add_library(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES}) if(CLR_CMAKE_PLATFORM_UNIX) target_link_libraries(utilcode_crossgen nativeresourcestring) endif(CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/utilcode/dac/CMakeLists.txt b/src/utilcode/dac/CMakeLists.txt index 8a957be1ab..573bac94cb 100644 --- a/src/utilcode/dac/CMakeLists.txt +++ b/src/utilcode/dac/CMakeLists.txt @@ -1,14 +1,12 @@ - include(${CLR_DIR}/dac.cmake) add_definitions(-DSELF_NO_HOST) -list(APPEND UTILCODE_SOURCES ../hostimpl.cpp) if(CLR_CMAKE_PLATFORM_UNIX) - add_library(utilcode_dac STATIC ${UTILCODE_SOURCES}) + add_library(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES}) target_link_libraries(utilcode_dac nativeresourcestring) add_dependencies(utilcode_dac coreclrpal) else() - add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES) - add_library(utilcode_dac STATIC ${UTILCODE_SOURCES}) + add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_DAC_SOURCES) + add_library(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES}) endif(CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/utilcode/staticnohost/CMakeLists.txt b/src/utilcode/staticnohost/CMakeLists.txt index c9912502c2..039aa3c121 100644 --- a/src/utilcode/staticnohost/CMakeLists.txt +++ b/src/utilcode/staticnohost/CMakeLists.txt @@ -1,16 +1,12 @@ add_definitions(-DSELF_NO_HOST) -list(APPEND UTILCODE_SOURCES ../hostimpl.cpp) - if(WIN32) add_definitions(-D_CRTIMP=) # use static version of crt - - add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES) + add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_STATICNOHOST_SOURCES) endif(WIN32) -add_library(utilcodestaticnohost STATIC ${UTILCODE_SOURCES}) +add_library(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES}) if(CLR_CMAKE_PLATFORM_UNIX) target_link_libraries(utilcodestaticnohost nativeresourcestring) endif(CLR_CMAKE_PLATFORM_UNIX) - |