Skip to content

Commit 8957509

Browse files
authored
Fold mscorrc.dll into coreclr.dll (#122135)
Simplifies resource loading and get rid of module loading.
1 parent 726b3df commit 8957509

29 files changed

+92
-679
lines changed

src/coreclr/binder/bindertracing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ namespace BinderTracing
219219
if (mvidMismatch)
220220
{
221221
StackSString format;
222-
format.LoadResource(CCompRC::Error, IDS_EE_FILELOAD_ERROR_GENERIC);
222+
format.LoadResource(IDS_EE_FILELOAD_ERROR_GENERIC);
223223
StackSString details;
224-
details.LoadResource(CCompRC::Error, IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT);
224+
details.LoadResource(IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT);
225225
errorMsg.FormatMessage(FORMAT_MESSAGE_FROM_STRING, format.GetUnicode(), 0, 0, m_assemblyName, details);
226226
}
227227

src/coreclr/debug/di/process.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include "corpriv.h"
2020
#include "corexcep.h"
21-
#include "../../dlls/mscorrc/resource.h"
2221
#include <limits.h>
2322

2423
#include <sstring.h>

src/coreclr/debug/di/rsappdomain.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#endif
1818

1919
#include "corpriv.h"
20-
#include "../../dlls/mscorrc/resource.h"
2120
#include <limits.h>
2221

2322

src/coreclr/debug/di/rsassembly.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#endif
1818

1919
#include "corpriv.h"
20-
#include "../../dlls/mscorrc/resource.h"
2120
#include <limits.h>
2221

2322

src/coreclr/debug/di/rsmain.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#endif
2020

2121
#include "corpriv.h"
22-
#include "../../dlls/mscorrc/resource.h"
2322
#include <limits.h>
2423

2524

src/coreclr/debug/ee/debugger.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "debugdebugger.h"
1414
#include "../inc/common.h"
1515
#include "eeconfig.h" // This is here even for retail & free builds...
16-
#include "../../dlls/mscorrc/resource.h"
1716

1817
#include "vars.hpp"
1918
#include <limits.h>

src/coreclr/debug/ee/debuggermessagebox.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <utilcode.h> // Utility helpers.
1010
#include <corerror.h>
1111
#include <clrversion.h>
12-
#include "../../dlls/mscorrc/resource.h"
1312

1413
// Output printf-style formatted text to the debugger if it's present or stdout otherwise.
1514
static void DbgPrintf(const LPCSTR szFormat, ...)

src/coreclr/debug/ee/funceval.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "debugdebugger.h"
1717
#include "../inc/common.h"
1818
#include "eeconfig.h" // This is here even for retail & free builds...
19-
#include "../../dlls/mscorrc/resource.h"
2019

2120
#include "vars.hpp"
2221
#include "threads.h"

src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ endif (CLR_CMAKE_HOST_UNIX AND NOT CLR_CMAKE_TARGET_ARCH_WASM)
8282
# order dependent and changing the order can result in undefined symbols in the shared
8383
# library.
8484
set(CORECLR_LIBRARIES
85+
mscorrc
8586
utilcode
8687
${START_LIBRARY_GROUP} # Start group of libraries that have circular references
8788
${LIB_CORDBEE}
@@ -137,7 +138,6 @@ if(CLR_CMAKE_TARGET_WIN32)
137138
else()
138139
list(APPEND CORECLR_LIBRARIES
139140
coreclrpal
140-
mscorrc
141141
)
142142
endif(CLR_CMAKE_TARGET_WIN32)
143143

src/coreclr/dlls/mscorrc/CMakeLists.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
include_directories("../../pal/prebuilt/corerror")
22

3-
add_definitions(-DFX_VER_INTERNALNAME_STR=mscorrc.dll)
4-
53
if(CLR_CMAKE_HOST_WIN32)
6-
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NOENTRY")
7-
8-
# remove /guard:cf, /guard:ehcont, and /CETCOMPAT from resource-only libraries
9-
set_property(DIRECTORY PROPERTY CLR_CONTROL_FLOW_GUARD OFF)
10-
11-
if (CLR_CMAKE_HOST_ARCH_AMD64)
12-
set_property(DIRECTORY PROPERTY CLR_EH_CONTINUATION OFF)
13-
string(REPLACE "/CETCOMPAT" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
14-
endif (CLR_CMAKE_HOST_ARCH_AMD64)
15-
16-
add_library_clr(mscorrc SHARED
4+
add_library_clr(mscorrc OBJECT
175
include.rc
186
)
19-
install_clr(TARGETS mscorrc DESTINATIONS . sharedFramework COMPONENT runtime)
207

218
else()
229
build_resources(${CMAKE_CURRENT_SOURCE_DIR}/include.rc mscorrc TARGET_CPP_FILE)

0 commit comments

Comments
 (0)