Blame SOURCES/coreclr-mscorlib.patch

105ad9
From 5164e76ce01fc36833a7f5e6fb7b1ec2f55c2262 Mon Sep 17 00:00:00 2001
105ad9
From: Omair Majid <omajid@redhat.com>
105ad9
Date: Wed, 1 Aug 2018 12:02:53 -0400
105ad9
Subject: [PATCH] Use the identified python when building
105ad9
 System.Private.CoreLib (#19043)
105ad9
105ad9
build.sh and build.cmd contain logic to identify a working version of
105ad9
python to use. System.Private.CoreLib ignores that and directly invokes
105ad9
'python', which may not work, or even execute a different program.
105ad9
---
105ad9
 build.sh                                                 | 2 ++
105ad9
 src/System.Private.CoreLib/System.Private.CoreLib.csproj | 2 +-
105ad9
 2 files changed, 3 insertions(+), 1 deletion(-)
105ad9
105ad9
diff --git a/build.sh b/build.sh
105ad9
index 091d6227caf..4002f2744c2 100755
105ad9
--- a/build.sh
105ad9
+++ b/build.sh
105ad9
@@ -22,6 +22,8 @@ then
105ad9
    exit 1
105ad9
 fi
105ad9
 
105ad9
+export PYTHON
105ad9
+
105ad9
 usage()
105ad9
 {
105ad9
     echo "Usage: $0 [BuildArch] [BuildType] [-verbose] [-coverage] [-cross] [-clangx.y] [-ninja] [-configureonly] [-skipconfigure] [-skipnative] [-skipmscorlib] [-skiptests] [-stripsymbols] [-ignorewarnings] [-cmakeargs] [-bindir]"
105ad9
diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj
105ad9
index 9a2fc681703..0a02d3cffdf 100644
105ad9
--- a/src/mscorlib/System.Private.CoreLib.csproj
105ad9
+++ b/src/mscorlib/System.Private.CoreLib.csproj
105ad9
@@ -543,7 +543,7 @@
105ad9
     <PropertyGroup>
105ad9
       <CMakeDefinitionSaveFile>$(IntermediateOutputPath)..\cmake.definitions</CMakeDefinitionSaveFile>
105ad9
     </PropertyGroup>
105ad9
-    <Exec Command="python $(MSBuildThisFileDirectory)..\scripts\check-definitions.py "$(CMakeDefinitionSaveFile)" "$(DefineConstants)" "$(IgnoreDefineConstants)" " />
105ad9
+    <Exec Command=""$(PYTHON)" $(MSBuildThisFileDirectory)..\scripts\check-definitions.py "$(CMakeDefinitionSaveFile)" "$(DefineConstants)" "$(IgnoreDefineConstants)" " />
105ad9
   </Target>
105ad9
   <PropertyGroup Condition="'$(BuildOS)' == 'Windows_NT'">
105ad9
     <EnableDotnetAnalyzers Condition="'$(EnableDotnetAnalyzers)'==''">true</EnableDotnetAnalyzers>