Blame SOURCES/build-coreclr-mscorlib.patch

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