summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Danes <onemihaid@hotmail.com>2015-12-12 15:12:10 +0200
committerMike Danes <onemihaid@hotmail.com>2015-12-13 00:06:09 +0200
commitd9604b22438b263077e180156160456418935a42 (patch)
tree26939517913d7f005d8d44aa2a368e6dd595aba7
parentade2cc7a51171c0ba264ecd72c7351d8bbda457f (diff)
downloadcoreclr-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.
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/binder/CMakeLists.txt14
-rw-r--r--src/binder/v3binder_crossgen/CMakeLists.txt2
-rw-r--r--src/utilcode/CMakeLists.txt47
-rw-r--r--src/utilcode/crossgen/CMakeLists.txt8
-rw-r--r--src/utilcode/dac/CMakeLists.txt8
-rw-r--r--src/utilcode/staticnohost/CMakeLists.txt8
-rw-r--r--src/vm/CMakeLists.txt30
-rw-r--r--src/vm/crossgen/CMakeLists.txt4
9 files changed, 75 insertions, 53 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6164d1f720..1792020f48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -387,9 +387,11 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DYNAMICBASE") #Use
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUGTYPE:cv,fixup") #debugging format
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /PDBCOMPRESS") #shrink pdb size
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG")
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4197,4013,4254,4070,4221")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4197,4013,4254,4070")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /INCREMENTAL:NO")
+set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /PDBCOMPRESS")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1572864")
@@ -643,6 +645,9 @@ if(WIN32)
add_definitions(-DFEATURE_X509)
add_definitions(-DFEATURE_X509_SECURESTRINGS)
add_definitions(-DPROFILING_SUPPORTED)
+ if (CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_ARM)
+ add_definitions(-DFEATURE_LAZY_COW_PAGES)
+ endif()
endif(WIN32)
add_definitions(-DFEATURE_MULTICOREJIT)
add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
diff --git a/src/binder/CMakeLists.txt b/src/binder/CMakeLists.txt
index 5dbd09dac4..9026958ab1 100644
--- a/src/binder/CMakeLists.txt
+++ b/src/binder/CMakeLists.txt
@@ -14,7 +14,7 @@ endif()
include_directories(BEFORE "../vm")
include_directories(BEFORE "inc")
-set(BINDER_SOURCES
+set(BINDER_COMMON_SOURCES
variables.cpp
utils.cpp
assemblyname.cpp
@@ -32,13 +32,22 @@ set(BINDER_SOURCES
compatibility.cpp
textualidentityparser.cpp
assemblyidentitycache.cpp
- clrprivbinderassemblyloadcontext.cpp
coreclrbindercommon.cpp
fusionassemblyname.cpp
fusionhelpers.cpp
)
+set(BINDER_SOURCES
+ ${BINDER_COMMON_SOURCES}
+ clrprivbinderassemblyloadcontext.cpp
+)
+
+set(BINDER_CROSSGEN_SOURCES
+ ${BINDER_COMMON_SOURCES}
+)
+
convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
+convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})
if(CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-fPIC)
@@ -46,4 +55,3 @@ endif(CLR_CMAKE_PLATFORM_UNIX)
add_subdirectory(v3binder)
add_subdirectory(v3binder_crossgen)
-
diff --git a/src/binder/v3binder_crossgen/CMakeLists.txt b/src/binder/v3binder_crossgen/CMakeLists.txt
index 811d2db834..aee5adf52d 100644
--- a/src/binder/v3binder_crossgen/CMakeLists.txt
+++ b/src/binder/v3binder_crossgen/CMakeLists.txt
@@ -2,5 +2,5 @@ include(${CLR_DIR}/crossgen.cmake)
add_library(v3binder_crossgen
STATIC
- ${BINDER_SOURCES}
+ ${BINDER_CROSSGEN_SOURCES}
)
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)
-
diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt
index e9e59f82fb..9a5d878ef8 100644
--- a/src/vm/CMakeLists.txt
+++ b/src/vm/CMakeLists.txt
@@ -50,13 +50,11 @@ set(VM_SOURCES_DAC_AND_WKS_COMMON
baseassemblyspec.cpp
binder.cpp
ceeload.cpp
- certificatecache.cpp
class.cpp
classhash.cpp
clsload.cpp
codeman.cpp
comdelegate.cpp
- contexts.cpp
contractimpl.cpp
coreassemblyspec.cpp
corebindresult.cpp
@@ -81,9 +79,6 @@ set(VM_SOURCES_DAC_AND_WKS_COMMON
fptrstubs.cpp
frames.cpp
../gc/gccommon.cpp
- gcdecode.cpp
- ../gc/gceesvr.cpp
- ../gc/gceewks.cpp
../gc/gcscan.cpp
../gc/gcsvr.cpp
../gc/gcwks.cpp
@@ -140,17 +135,16 @@ set(VM_SOURCES_DAC_AND_WKS_COMMON
set(VM_SOURCES_DAC
${VM_SOURCES_DAC_AND_WKS_COMMON}
+ contexts.cpp
threaddebugblockinginfo.cpp
)
set(VM_SOURCES_WKS
${VM_SOURCES_DAC_AND_WKS_COMMON}
- appdomainhelper.cpp
appdomainnative.cpp
appdomainstack.cpp
assemblyname.cpp
assemblynative.cpp
- assemblysink.cpp
assemblyspec.cpp
cachelinealloc.cpp
callhelpers.cpp
@@ -163,7 +157,6 @@ set(VM_SOURCES_WKS
comdynamic.cpp
comisolatedstorage.cpp
commemoryfailpoint.cpp
- commethodrental.cpp
commodule.cpp
compatibilityswitch.cpp
comsynchronizable.cpp
@@ -172,7 +165,6 @@ set(VM_SOURCES_WKS
comwaithandle.cpp
constrainedexecutionregion.cpp
coverage.cpp
- crossdomaincalls.cpp
customattribute.cpp
custommarshalerinfo.cpp
dbggcinfodecoder.cpp
@@ -183,7 +175,6 @@ set(VM_SOURCES_WKS
eepolicy.cpp
eetoprofinterfaceimpl.cpp
eventstore.cpp
- exceptionhandling.cpp
fcall.cpp
fieldmarshaler.cpp
finalizerthread.cpp
@@ -191,11 +182,10 @@ set(VM_SOURCES_WKS
gccover.cpp
gcenv.cpp
gchelpers.cpp
- gchost.cpp
- gcinfodecoder.cpp
genmeth.cpp
+ ../gc/gceesvr.cpp
+ ../gc/gceewks.cpp
../gc/handletablecache.cpp
- hostexecutioncontext.cpp
hosting.cpp
ibclogger.cpp
ilmarshalers.cpp
@@ -209,7 +199,6 @@ set(VM_SOURCES_WKS
marshalnative.cpp
marvin32.cpp
mdaassistants.cpp
- message.cpp
methodtablebuilder.cpp
mlinfo.cpp
mscorlib.cpp # <DisablePrecompiledHeaders>true</DisablePrecompiledHeaders>
@@ -232,11 +221,9 @@ set(VM_SOURCES_WKS
reflectclasswriter.cpp
reflectioninvocation.cpp
runtimehandles.cpp
- rwlock.cpp
safehandle.cpp
security.cpp
securityattributes.cpp
- securityconfig.cpp
securitydeclarative.cpp
securitydeclarativecache.cpp
securitydescriptorappdomain.cpp
@@ -259,7 +246,6 @@ set(VM_SOURCES_WKS
testhookmgr.cpp
threaddebugblockinginfo.cpp
threadsuspend.cpp
- typeequivalencehash.cpp
typeparse.cpp
verifier.cpp
weakreferencenative.cpp
@@ -275,9 +261,7 @@ if(WIN32)
set(VM_SOURCES_DAC_AND_WKS_WIN32
clrtocomcall.cpp
- comtoclrcall.cpp
rcwwalker.cpp
- umthunkhash.cpp #" Condition="'$(FeatureMixedMode)' == 'true'
winrttypenameconverter.cpp
)
@@ -295,6 +279,7 @@ list(APPEND VM_SOURCES_WKS
comconnectionpoints.cpp
cominterfacemarshaler.cpp
commtmemberinfomap.cpp
+ comtoclrcall.cpp
dispatchinfo.cpp
dispparammarshaler.cpp
dwreport.cpp
@@ -404,10 +389,13 @@ if(CLR_CMAKE_PLATFORM_ARCH_AMD64)
${ARCH_SOURCES_DIR}/jithelpersamd64.cpp
${ARCH_SOURCES_DIR}/jitinterfaceamd64.cpp
${ARCH_SOURCES_DIR}/profiler.cpp
+ exceptionhandling.cpp
+ gcinfodecoder.cpp
jitinterfacegen.cpp
)
elseif(CLR_CMAKE_PLATFORM_ARCH_I386)
set(VM_SOURCES_DAC_AND_WKS_ARCH
+ gcdecode.cpp
exinfo.cpp
${ARCH_SOURCES_DIR}/cgenx86.cpp
${ARCH_SOURCES_DIR}/excepx86.cpp
@@ -430,11 +418,15 @@ elseif(CLR_CMAKE_PLATFORM_ARCH_ARM)
set(VM_SOURCES_WKS_ARCH
${ARCH_SOURCES_DIR}/jithelpersarm.cpp
${ARCH_SOURCES_DIR}/profiler.cpp
+ exceptionhandling.cpp
+ gcinfodecoder.cpp
)
elseif(CLR_CMAKE_PLATFORM_ARCH_ARM64)
set(VM_SOURCES_DAC_AND_WKS_ARCH
${ARCH_SOURCES_DIR}/cgenarm64.cpp
${ARCH_SOURCES_DIR}/stubs.cpp
+ exceptionhandling.cpp
+ gcinfodecoder.cpp
)
endif()
diff --git a/src/vm/crossgen/CMakeLists.txt b/src/vm/crossgen/CMakeLists.txt
index f5d2399a08..c112698554 100644
--- a/src/vm/crossgen/CMakeLists.txt
+++ b/src/vm/crossgen/CMakeLists.txt
@@ -22,7 +22,6 @@ set(VM_CROSSGEN_SOURCES
../baseassemblyspec.cpp
../corebindresult.cpp
../coreassemblyspec.cpp
- ../crossdomaincalls.cpp
../dataimage.cpp
../decodemd.cpp
../debuginfostore.cpp
@@ -34,8 +33,6 @@ set(VM_CROSSGEN_SOURCES
../field.cpp
../fieldmarshaler.cpp
../formattype.cpp
- ../typeequivalencehash.cpp
- ../gcdecode.cpp
../genericdict.cpp
../generics.cpp
../genmeth.cpp
@@ -113,6 +110,7 @@ elseif(CLR_CMAKE_PLATFORM_ARCH_I386)
include_directories(../i386)
list(APPEND VM_CROSSGEN_SOURCES
../i386/stublinkerx86.cpp
+ ../gcdecode.cpp
)
elseif(CLR_CMAKE_PLATFORM_ARCH_ARM)
include_directories(../arm)