Change the default for ilc compiler architecture (#79761)
authorJan Kotas <jkotas@microsoft.com>
Fri, 16 Dec 2022 20:18:44 +0000 (12:18 -0800)
committerGitHub <noreply@github.com>
Fri, 16 Dec 2022 20:18:44 +0000 (12:18 -0800)
The host architecture for the ilc compiler package should default to .NET SDK architecture that the build is running under.

Fixes #79253

src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets

index ac9f9e54d4dbf166e1fc79aa3856c1c8126d4106..4da300862aed75534106141d7341267d1afc8f11 100644 (file)
@@ -17,9 +17,8 @@
 
     <RuntimeIlcPackageName>runtime.$(OSIdentifier)-$(TargetArchitecture).Microsoft.DotNet.ILCompiler</RuntimeIlcPackageName>
 
-    <OSHostArch>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</OSHostArch>
-
-    <IlcHostArch Condition="'$(IlcHostArch)' == ''">$(OSHostArch)</IlcHostArch>
+    <!-- Default to host that matches SDK architecture -->
+    <IlcHostArch Condition="'$(IlcHostArch)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</IlcHostArch>
     <IlcHostPackageName>runtime.$(OSIdentifier)-$(IlcHostArch).Microsoft.DotNet.ILCompiler</IlcHostPackageName>
     
     <IlcCalledViaPackage>true</IlcCalledViaPackage>