Blame SOURCES/build-coreclr-mscorlib.patch

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