Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Update CoreCLR to a newer commit so that it will build under VS 2015 …
Browse files Browse the repository at this point in the history
…Update 1.

In the process of updating the patch set to work with the newer commit,
the patch set for CoreCLR was broken out into individual files to make
maintaining them easier.
  • Loading branch information
brettcannon committed Dec 3, 2015
1 parent d667252 commit a7b862a
Show file tree
Hide file tree
Showing 14 changed files with 193 additions and 180 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -1,6 +1,7 @@
# Auto detect text files and perform LF normalization
* text=auto
*.diff text eol=lf
/Patches/** eol=lf

# Custom for Visual Studio
*.cs diff=csharp
Expand Down
23 changes: 12 additions & 11 deletions .gitignore
@@ -1,12 +1,13 @@
Python/
CoreCLR/
Libs/
Pyjion/x64/
Test/x64/
Tools/*.h
Tools/*.cpp
ipch/
x64/
.vs/
/Python/
/CoreCLR/
/Libs/
/Pyjion/x64/
/Test/x64/
/Tools/*.h
/Tools/*.cpp
/ipch/
/x64/
/.vs/
*.opensdf
*.sdf
*.sdf
*.opendb
14 changes: 11 additions & 3 deletions GetDeps.bat
Expand Up @@ -10,13 +10,21 @@ REM ########################################################
REM # Clone CoreCLR code base
git clone https://github.com/dotnet/coreclr CoreCLR
pushd CoreCLR
git reset --hard 98c63c1612b2635a40d9a719c1505e0ad4bef08a
git reset --hard b16ff5935ff9df3211798f18f0c951666ae27774

REM ########################################################
REM # Apply changes to disable COM interop support

echo Disabling COM interop support...
git apply ..\coreclr.diff
git apply ..\Patches\CoreCLR\src\inc\utilcode.h
git apply ..\Patches\CoreCLR\src\utilcode\CMakeLists.txt
git apply ..\Patches\CoreCLR\src\utilcode\util.cpp
git apply ..\Patches\CoreCLR\src\CMakeLists.txt
git apply ..\Patches\CoreCLR\build.cmd
git apply ..\Patches\CoreCLR\clr.coreclr.props
git apply ..\Patches\CoreCLR\clr.defines.targets
git apply ..\Patches\CoreCLR\clr.desktop.props
git apply ..\Patches\CoreCLR\CMakeLists.txt
popd

REM ########################################################
Expand All @@ -31,5 +39,5 @@ REM ########################################################
REM # Apply changes to integrate JIT support into CPython

echo Applying changes to enable JIT support...
git apply ..\python.diff
git apply ..\Patches\python.diff
popd
13 changes: 13 additions & 0 deletions Patches/CoreCLR/CMakeLists.txt
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80625f9..7d4642d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -573,7 +573,7 @@ add_definitions(-DFEATURE_ASYNC_IO)
add_definitions(-DFEATURE_BCL_FORMATTING)
add_definitions(-DFEATURE_COLLECTIBLE_TYPES)

-if(WIN32)
+if(FALSE)
add_definitions(-DFEATURE_CLASSIC_COMINTEROP)
add_definitions(-DFEATURE_APPX)
add_definitions(-DFEATURE_COMINTEROP)
24 changes: 24 additions & 0 deletions Patches/CoreCLR/build.cmd
@@ -0,0 +1,24 @@
diff --git a/build.cmd b/build.cmd
index 046970e..960cfb7 100644
--- a/build.cmd
+++ b/build.cmd
@@ -123,7 +123,7 @@ exit /b 1
:: Note: We've disabled node reuse because it causes file locking issues.
:: The issue is that we extend the build with our own targets which
:: means that that rebuilding cannot successfully delete the task
-:: assembly.
+:: assembly.
if /i "%__VSVersion%" =="vs2015" goto MSBuild14
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
@@ -174,8 +174,8 @@ exit /b 1
REM Build CoreCLR
:BuildCoreCLR
set "__CoreCLRBuildLog=%__LogsDir%\CoreCLR_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
-%_msbuildexe% "%__IntermediatesDir%\install.vcxproj" %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=normal;LogFile="%__CoreCLRBuildLog%"
-IF NOT ERRORLEVEL 1 goto PerformMScorlibBuild
+%_msbuildexe% "%__IntermediatesDir%\install.vcxproj" %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=normal;LogFile="%__CoreCLRBuildLog%" /p:FeatureCominterop=false
+IF NOT ERRORLEVEL 1 goto SuccessfulBuild
echo Native component build failed. Refer !__CoreCLRBuildLog! for details.
exit /b 1

30 changes: 30 additions & 0 deletions Patches/CoreCLR/clr.coreclr.props
@@ -0,0 +1,30 @@
diff --git a/clr.coreclr.props b/clr.coreclr.props
index 2373b7b..2c0aa4e 100644
--- a/clr.coreclr.props
+++ b/clr.coreclr.props
@@ -10,7 +10,7 @@
<FeatureStubsAsIL Condition="'$(TargetArch)' == 'arm64'">true</FeatureStubsAsIL>
<FeatureBclFormatting>true</FeatureBclFormatting>
<FeatureCollectibleTypes>true</FeatureCollectibleTypes>
- <FeatureCominteropApartmentSupport>true</FeatureCominteropApartmentSupport>
+ <FeatureCominteropApartmentSupport>false</FeatureCominteropApartmentSupport>
<FeatureCoreclr>true</FeatureCoreclr>
<FeatureCorruptingExceptions>true</FeatureCorruptingExceptions>
<FeatureDbiDebugging>true</FeatureDbiDebugging>
@@ -57,12 +57,12 @@
<FeatureReadyToRun Condition="'$(TargetArch)'!='arm64'">true</FeatureReadyToRun>

<FeatureCoreSystem>true</FeatureCoreSystem>
- <FeatureClassicCominterop>true</FeatureClassicCominterop>
+ <FeatureClassicCominterop>false</FeatureClassicCominterop>
<FeatureLegacySurface>true</FeatureLegacySurface>
- <FeatureCominterop>true</FeatureCominterop>
+ <FeatureCominterop>false</FeatureCominterop>
<FeatureICastable>true</FeatureICastable>
- <FeatureCominteropUnmanagedActivation>true</FeatureCominteropUnmanagedActivation>
- <FeatureCominteropWinRTManagedActivation>true</FeatureCominteropWinRTManagedActivation>
+ <FeatureCominteropUnmanagedActivation>false</FeatureCominteropUnmanagedActivation>
+ <FeatureCominteropWinRTManagedActivation>false</FeatureCominteropWinRTManagedActivation>
<FeatureCrypto>true</FeatureCrypto>
<FeatureHostAssemblyResolver>true</FeatureHostAssemblyResolver>
<FeatureLazyCOWPages Condition="('$(TargetArch)' == 'i386') or ('$(TargetArch)' == 'arm')">true</FeatureLazyCOWPages>
13 changes: 13 additions & 0 deletions Patches/CoreCLR/clr.defines.targets
@@ -0,0 +1,13 @@
diff --git a/clr.defines.targets b/clr.defines.targets
index 879de92..fe2b3b6 100644
--- a/clr.defines.targets
+++ b/clr.defines.targets
@@ -18,7 +18,7 @@
<CDefines Condition="'$(FeatureTraceLogging)' == 'true'">$(CDefines);FEATURE_TRACELOGGING</CDefines>
<CDefines Condition="'$(FeatureCodepagesFile)' == 'true'">$(CDefines);FEATURE_CODEPAGES_FILE</CDefines>
<CDefines Condition="'$(FeatureCollectibleTypes)' == 'true'">$(CDefines);FEATURE_COLLECTIBLE_TYPES</CDefines>
- <CDefines Condition="'$(FeatureCominterop)' == 'true'">$(CDefines);FEATURE_COMINTEROP</CDefines>
+<!-- <CDefines Condition="'$(FeatureCominterop)' == 'true'">$(CDefines);FEATURE_COMINTEROP</CDefines> -->
<CDefines Condition="'$(FeatureICastable)' == 'true'">$(CDefines);FEATURE_ICASTABLE</CDefines>
<CDefines Condition="'$(FeatureCominteropApartmentSupport)' == 'true'">$(CDefines);FEATURE_COMINTEROP_APARTMENT_SUPPORT</CDefines>
<CDefines Condition="'$(FeatureCominteropManagedActivation)' == 'true'">$(CDefines);FEATURE_COMINTEROP_MANAGED_ACTIVATION</CDefines>
13 changes: 13 additions & 0 deletions Patches/CoreCLR/clr.desktop.props
@@ -0,0 +1,13 @@
diff --git a/clr.desktop.props b/clr.desktop.props
index 84dd6cf..14e6a09 100644
--- a/clr.desktop.props
+++ b/clr.desktop.props
@@ -19,7 +19,7 @@
<FeatureClickonce>true</FeatureClickonce>
<FeatureCodepagesFile>true</FeatureCodepagesFile>
<FeatureCollectibleTypes>true</FeatureCollectibleTypes>
- <FeatureCominterop>true</FeatureCominterop>
+ <FeatureCominterop>false</FeatureCominterop>
<FeatureCominteropApartmentSupport>true</FeatureCominteropApartmentSupport>
<FeatureCominteropManagedActivation>true</FeatureCominteropManagedActivation>
<FeatureCominteropRegistration>true</FeatureCominteropRegistration>
29 changes: 29 additions & 0 deletions Patches/CoreCLR/src/CMakeLists.txt
@@ -0,0 +1,29 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 31c37e5..c56a892 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -38,22 +38,10 @@ endif(CLR_CMAKE_PLATFORM_UNIX)

add_subdirectory(utilcode)
add_subdirectory(gcinfo)
-add_subdirectory(coreclr)
add_subdirectory(jit)
-add_subdirectory(vm)
-add_subdirectory(md)
-add_subdirectory(debug)
add_subdirectory(inc)
-add_subdirectory(strongname)
-add_subdirectory(binder)
-add_subdirectory(classlibnative)
-add_subdirectory(dlls)
-add_subdirectory(ToolBox)
-add_subdirectory(tools)
-add_subdirectory(unwinder)
-add_subdirectory(ildasm)
-
-if(WIN32)
+
+if(FALSE)
add_subdirectory(ipcman)
endif(WIN32)

13 changes: 13 additions & 0 deletions Patches/CoreCLR/src/inc/utilcode.h
@@ -0,0 +1,13 @@
diff --git a/src/inc/utilcode.h b/src/inc/utilcode.h
index fa0e1b1..9722315 100644
--- a/src/inc/utilcode.h
+++ b/src/inc/utilcode.h
@@ -9,6 +9,8 @@
//
//*****************************************************************************

+#define SetErrorInfo __DoNotUseSetErrorInfo
+
#ifndef __UtilCode_h__
#define __UtilCode_h__

14 changes: 14 additions & 0 deletions Patches/CoreCLR/src/utilcode/CMakeLists.txt
@@ -0,0 +1,14 @@
diff --git a/src/utilcode/CMakeLists.txt b/src/utilcode/CMakeLists.txt
index 52a017f..5a37a4b 100644
--- a/src/utilcode/CMakeLists.txt
+++ b/src/utilcode/CMakeLists.txt
@@ -71,8 +71,7 @@ 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
- appxutil.cpp
+ list(APPEND UTILCODE_SOURCES
dlwrap.cpp
downlevel.cpp
loadrc.cpp
20 changes: 20 additions & 0 deletions Patches/CoreCLR/src/utilcode/util.cpp
@@ -0,0 +1,20 @@
diff --git a/src/utilcode/util.cpp b/src/utilcode/util.cpp
index d7d3a9f..972edd7 100644
--- a/src/utilcode/util.cpp
+++ b/src/utilcode/util.cpp
@@ -212,6 +212,7 @@ typedef HRESULT __stdcall DLLGETCLASSOBJECT(REFCLSID rclsid,
EXTERN_C const IID _IID_IClassFactory =
{0x00000001, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};

+#if FEATURE_COMINTEROP
// ----------------------------------------------------------------------------
// FakeCoCreateInstanceEx
//
@@ -374,6 +375,7 @@ HRESULT FakeCoCallDllGetClassObject(REFCLSID rclsid,

return hr;
}
+#endif

#if USE_UPPER_ADDRESS
static BYTE * s_CodeMinAddr; // Preferred region to allocate the code in.
File renamed without changes.

0 comments on commit a7b862a

Please sign in to comment.