diff --git a/build_projects/dotnet-host-build/CompileTargets.cs b/build_projects/dotnet-host-build/CompileTargets.cs index 8b3553e785..0874a9af57 100644 --- a/build_projects/dotnet-host-build/CompileTargets.cs +++ b/build_projects/dotnet-host-build/CompileTargets.cs @@ -24,6 +24,7 @@ public class CompileTargets // Key: Current platform RID. Value: The actual publishable (non-dummy) package name produced by the build system for this RID. { "win7-x64", "win7-x64" }, { "win7-x86", "win7-x86" }, + { "win8-arm", "win8-arm" }, { "win10-arm64", "win10-arm64" }, { "osx.10.10-x64", "osx.10.10-x64" }, { "osx.10.11-x64", "osx.10.10-x64" }, @@ -193,6 +194,7 @@ public static BuildTargetResult CompileCoreHost(BuildTargetContext c) string cmakeHostFxrVer = $"-DCLI_CMAKE_HOST_FXR_VER:STRING={hostVersion.LatestHostFxrVersion.ToString()}"; string cmakeCommitHash = $"-DCLI_CMAKE_COMMIT_HASH:STRING={commitHash}"; string cmakeResourceDir = $"-DCLI_CMAKE_RESOURCE_DIR:STRING={resourceDir}"; + string cmakeExtraArgs = ""; switch (platform.ToLower()) { @@ -202,6 +204,12 @@ public static BuildTargetResult CompileCoreHost(BuildTargetContext c) archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_I386=1"; arch = "x86"; break; + case "arm": + cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win8-arm"; + visualStudio = "Visual Studio 14 2015 ARM"; + archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_ARM=1 -DCMAKE_SYSTEM_VERSION=10.0"; + arch = "arm"; + break; case "arm64": cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win10-arm64"; visualStudio = "Visual Studio 14 2015 Win64"; diff --git a/build_projects/dotnet-host-build/MsiTargets.cs b/build_projects/dotnet-host-build/MsiTargets.cs index 992c50c997..40a6a6552b 100644 --- a/build_projects/dotnet-host-build/MsiTargets.cs +++ b/build_projects/dotnet-host-build/MsiTargets.cs @@ -40,7 +40,11 @@ private static string WixRoot private static string DisplayVersion { get; set; } - private static string Arch { get; } = CurrentArchitecture.Current.ToString(); + // Processor Architecture of MSI's contents + private static string TargetArch { get; set; } + + // Processor Architecture of MSI itself + private static string MSIBuildArch { get; set; } private static void AcquireWix(BuildTargetContext c) { @@ -87,6 +91,20 @@ public static BuildTargetResult InitMsi(BuildTargetContext c) MsiVersion = buildVersion.GenerateMsiVersion(); DisplayVersion = buildVersion.SimpleVersion; + TargetArch = c.BuildContext.Get("Platform"); + + MSIBuildArch = CurrentArchitecture.Current.ToString(); + + // If we are building the MSI for Arm32 or Arm64, then build it as x86 or x64 for now. + if (String.Compare(TargetArch, "arm", true) == 0) + { + MSIBuildArch = "x86"; + } + else if (String.Compare(TargetArch, "arm64", true) == 0) + { + MSIBuildArch = "x64"; + } + AcquireWix(c); return c.Success(); } @@ -128,7 +146,7 @@ public static BuildTargetResult GenerateDotnetSharedHostMsi(BuildTargetContext c Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"), - inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, hostMsiVersion, hostNugetVersion, Arch, wixObjRoot) + inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, hostMsiVersion, hostNugetVersion, MSIBuildArch, TargetArch, wixObjRoot) .Execute() .EnsureSuccessful(); return c.Success(); @@ -153,7 +171,7 @@ public static BuildTargetResult GenerateDotnetHostFxrMsi(BuildTargetContext c) Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "hostfxr", "generatemsi.ps1"), - inputDir, HostFxrMsi, WixRoot, hostFxrBrandName, hostFxrMsiVersion, hostFxrNugetVersion, Arch, wixObjRoot) + inputDir, HostFxrMsi, WixRoot, hostFxrBrandName, hostFxrMsiVersion, hostFxrNugetVersion, MSIBuildArch, TargetArch, wixObjRoot) .Execute() .EnsureSuccessful(); return c.Success(); @@ -179,7 +197,7 @@ public static BuildTargetResult GenerateDotnetSharedFrameworkMsi(BuildTargetCont Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatemsi.ps1"), - inputDir, SharedFrameworkMsi, WixRoot, sharedFxBrandName, msiVerison, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch, wixObjRoot) + inputDir, SharedFrameworkMsi, WixRoot, sharedFxBrandName, msiVerison, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, MSIBuildArch, TargetArch, wixObjRoot) .Execute() .EnsureSuccessful(); return c.Success(); @@ -196,7 +214,7 @@ public static BuildTargetResult GenerateSharedFxBundle(BuildTargetContext c) Cmd("powershell", "-NoProfile", "-NoLogo", Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatebundle.ps1"), - SharedFrameworkMsi, SharedHostMsi, HostFxrMsi, SharedFrameworkBundle, WixRoot, sharedFxBrandName, MsiVersion, DisplayVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, Arch) + SharedFrameworkMsi, SharedHostMsi, HostFxrMsi, SharedFrameworkBundle, WixRoot, sharedFxBrandName, MsiVersion, DisplayVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, TargetArch, MSIBuildArch) .Execute() .EnsureSuccessful(); return c.Success(); diff --git a/build_projects/dotnet-host-build/PublishTargets.cs b/build_projects/dotnet-host-build/PublishTargets.cs index adb950e98f..e9738046fa 100644 --- a/build_projects/dotnet-host-build/PublishTargets.cs +++ b/build_projects/dotnet-host-build/PublishTargets.cs @@ -115,6 +115,7 @@ public static BuildTargetResult FinalizeBuild(BuildTargetContext c) { "win.x86.version", "win.x64.version", + "win.arm.version", "win.arm64.version", "ubuntu.x64.version", "ubuntu.16.04.x64.version", @@ -180,6 +181,7 @@ private static bool CheckIfAllBuildsHavePublished() { { "sharedfx_Windows_x86", false }, { "sharedfx_Windows_x64", false }, + { "sharedfx_Windows_arm", false }, { "sharedfx_Windows_arm64", false }, { "sharedfx_Ubuntu_x64", false }, { "sharedfx_Ubuntu_16_04_x64", false }, diff --git a/build_projects/dotnet-host-build/TestTargets.cs b/build_projects/dotnet-host-build/TestTargets.cs index 771bc133ae..e40f340baa 100644 --- a/build_projects/dotnet-host-build/TestTargets.cs +++ b/build_projects/dotnet-host-build/TestTargets.cs @@ -100,8 +100,30 @@ private static List RunDotnetTestOnTestProjects(BuildTargetContext c, Do { var failingTests = new List(); + // Fetch the target RID to determine if we support running tests or not. + string rid = c.BuildContext.Get("TargetRID"); + bool fIsCrossArch = false; + if (!String.IsNullOrEmpty(rid)) + { + if ((String.Compare(rid, "win8-arm", true) == 0) || (String.Compare(rid, "win10-arm64", true) == 0)) + { + // We dont support running native tests for cross-architecture builds yet. + fIsCrossArch = true; + } + } + foreach (var project in TestProjects) { + // Explicitly checking for the host tests since they are the only ones running native code. + if (String.Compare("HostActivationTests", project) == 0) + { + if (fIsCrossArch) + { + c.Info($"Skipping tests in: {project} since cross-arch test runs are not yet supported for {rid}."); + continue; + } + } + c.Info($"Running tests in: {project}"); var result = dotnet.Test("--configuration", configuration, "-xml", $"{project}-testResults.xml", "-notrait", "category=failing") diff --git a/build_projects/dotnet-host-build/build.ps1 b/build_projects/dotnet-host-build/build.ps1 index 6d28b39a2f..8aa9f52b7c 100644 --- a/build_projects/dotnet-host-build/build.ps1 +++ b/build_projects/dotnet-host-build/build.ps1 @@ -21,7 +21,7 @@ if($Help) Write-Host "Options:" Write-Host " -Configuration Build the specified Configuration (Debug or Release, default: Debug)" Write-Host " -Architecture Build on the specified architecture (x64 or x86 (supported only on Windows), default: x64)" - Write-Host " -TargetArch Build for the specified architecture (x64, x86 (supported only on Windows), or arm64, default: x64)" + Write-Host " -TargetArch Build for the specified architecture (x64, x86 (supported only on Windows), arm, or arm64, default: x64)" Write-Host " -ToolsetDir Temporary variable specifying a path to a toolset to use when building the native host for ARM64. To be removed when the toolset is publicly available. )" Write-Host " -Framework Build the specified framework (netcoreapp1.0 or netcoreapp1.1, default: netcoreapp1.0)" Write-Host " -Targets Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)" @@ -63,6 +63,10 @@ if($TargetArch -eq "x64" -and $Architecture -ne "x64") { $env:TARGETRID = "win7-x64"; } +if($TargetArch -eq "arm") +{ + $env:TARGETRID = "win8-arm"; +} if($NoPackage) { diff --git a/build_projects/shared-build-targets-utils/Utils/Crossgen.cs b/build_projects/shared-build-targets-utils/Utils/Crossgen.cs index 8cf685abb8..d56a2b8a29 100644 --- a/build_projects/shared-build-targets-utils/Utils/Crossgen.cs +++ b/build_projects/shared-build-targets-utils/Utils/Crossgen.cs @@ -38,14 +38,27 @@ public Crossgen(string coreClrVersion, string jitVersion, string targetRID = nul private string GetCrossgenPathForVersion() { var crossgenPackagePath = GetCrossGenPackagePathForVersion(); + string ridCrossgen = null; if (crossgenPackagePath == null) { - return null; + return ridCrossgen; + } + + if (_targetRID == "win8-arm") + { + ridCrossgen = Path.Combine(crossgenPackagePath, "tools", "x86_arm", $"crossgen{Constants.ExeSuffix}"); + } + else if (_targetRID == "win10-arm64") + { + ridCrossgen = Path.Combine(crossgenPackagePath, "tools", "x64_arm64", $"crossgen{Constants.ExeSuffix}"); + } + else + { + ridCrossgen = Path.Combine(crossgenPackagePath, "tools", $"crossgen{Constants.ExeSuffix}"); } - return (_targetRID == "win10-arm64") ? - Path.Combine(crossgenPackagePath, "tools", "x64_arm64", $"crossgen{Constants.ExeSuffix}") : - Path.Combine(crossgenPackagePath, "tools", $"crossgen{Constants.ExeSuffix}"); + + return ridCrossgen; } private string GetLibCLRJitPathForVersion() @@ -57,9 +70,19 @@ private string GetLibCLRJitPathForVersion() { return null; } - return (_targetRID == "win10-arm64") ? - Path.Combine(jitPackagePath, "runtimes", "x64_arm64", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}") : - Path.Combine(jitPackagePath, "runtimes", jitRid, "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}"); + + string jitPath = Path.Combine(jitPackagePath, "runtimes", jitRid, "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}"); + + if (_targetRID == "win8-arm") + { + jitPath = Path.Combine(jitPackagePath, "runtimes", "x86_arm", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}"); + } + else if (_targetRID == "win10-arm64") + { + jitPath = Path.Combine(jitPackagePath, "runtimes", "x64_arm64", "native", $"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}"); + } + + return jitPath; } private string GetJitPackagePathForVersion() diff --git a/build_projects/shared-build-targets-utils/Utils/SharedFrameworkPublisher.cs b/build_projects/shared-build-targets-utils/Utils/SharedFrameworkPublisher.cs index 162e10f691..cc43eee254 100644 --- a/build_projects/shared-build-targets-utils/Utils/SharedFrameworkPublisher.cs +++ b/build_projects/shared-build-targets-utils/Utils/SharedFrameworkPublisher.cs @@ -42,7 +42,16 @@ public SharedFrameworkPublisher( _corehostLockedDirectory = corehostLockedDirectory; _corehostLatestDirectory = corehostLatestDirectory; _corehostPackageSource = corehostPackageSource; - _crossgenUtil = new Crossgen(DependencyVersions.CoreCLRVersion, DependencyVersions.JitVersion, sharedFrameworkRid == "win10-arm64" ? sharedFrameworkRid : null); + + string crossgenRID = null; + + // If we are dealing with cross-targeting compilation, then specify the + // correct RID for crossgen to use when compiling SharedFramework. + if ((sharedFrameworkRid == "win8-arm") || (sharedFrameworkRid == "win10-arm64")) + { + crossgenRID = sharedFrameworkRid; + } + _crossgenUtil = new Crossgen(DependencyVersions.CoreCLRVersion, DependencyVersions.JitVersion, crossgenRID); _sharedFrameworkTemplateSourceRoot = Path.Combine(repoRoot, "src", "sharedframework", "framework"); _sharedFrameworkNugetVersion = sharedFrameworkNugetVersion; diff --git a/packaging/windows/host/generatemsi.ps1 b/packaging/windows/host/generatemsi.ps1 index 675dc12ef9..d6f1479587 100644 --- a/packaging/windows/host/generatemsi.ps1 +++ b/packaging/windows/host/generatemsi.ps1 @@ -9,6 +9,7 @@ param( [Parameter(Mandatory=$true)][string]$SharedHostMSIVersion, [Parameter(Mandatory=$true)][string]$SharedHostNugetVersion, [Parameter(Mandatory=$true)][string]$Architecture, + [Parameter(Mandatory=$true)][string]$TargetArchitecture, [Parameter(Mandatory=$true)][string]$WixObjRoot ) @@ -31,6 +32,7 @@ function RunCandle -dProductMoniker="$ProductMoniker" ` -dBuildVersion="$SharedHostMSIVersion" ` -dNugetVersion="$SharedHostNugetVersion" ` + -dTargetArchitecture="$TargetArchitecture" ` -arch $Architecture ` "$AuthWsxRoot\host.wxs" ` "$AuthWsxRoot\provider.wxs" ` diff --git a/packaging/windows/host/variables.wxi b/packaging/windows/host/variables.wxi index fba50a8d0b..3a36aa653a 100644 --- a/packaging/windows/host/variables.wxi +++ b/packaging/windows/host/variables.wxi @@ -7,7 +7,7 @@ - + diff --git a/packaging/windows/hostfxr/generatemsi.ps1 b/packaging/windows/hostfxr/generatemsi.ps1 index 2599d16d17..37d92517bd 100644 --- a/packaging/windows/hostfxr/generatemsi.ps1 +++ b/packaging/windows/hostfxr/generatemsi.ps1 @@ -9,6 +9,7 @@ param( [Parameter(Mandatory=$true)][string]$HostFxrMSIVersion, [Parameter(Mandatory=$true)][string]$HostFxrNugetVersion, [Parameter(Mandatory=$true)][string]$Architecture, + [Parameter(Mandatory=$true)][string]$TargetArchitecture, [Parameter(Mandatory=$true)][string]$WixObjRoot ) @@ -63,6 +64,7 @@ function RunCandle -dBuildVersion="$HostFxrMSIVersion" ` -dNugetVersion="$HostFxrNugetVersion" ` -dComponentVersion="$ComponentVersion" ` + -dTargetArchitecture="$TargetArchitecture" ` -arch $Architecture ` -ext WixDependencyExtension.dll ` "$AuthWsxRoot\hostfxr.wxs" ` diff --git a/packaging/windows/hostfxr/variables.wxi b/packaging/windows/hostfxr/variables.wxi index 7fd96e8247..9014fe9505 100644 --- a/packaging/windows/hostfxr/variables.wxi +++ b/packaging/windows/hostfxr/variables.wxi @@ -8,7 +8,7 @@ - + diff --git a/packaging/windows/sharedframework/bundle.wxs b/packaging/windows/sharedframework/bundle.wxs index bd18afff6d..7e7f7a2a41 100644 --- a/packaging/windows/sharedframework/bundle.wxs +++ b/packaging/windows/sharedframework/bundle.wxs @@ -24,7 +24,7 @@ - + - + diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds index 6d5c58da76..2630c1b6c7 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.builds @@ -19,6 +19,10 @@ Windows_NT x86 + + Windows_NT + arm + Windows_NT arm64 diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj index cc85aed5f2..a62ffa06de 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHost.pkgproj @@ -6,7 +6,7 @@ $(HostVersion) true true - x64;x86;arm64; + x64;x86;arm;arm64; $(PackagesOutputPath) true true @@ -19,6 +19,9 @@ x86 + + arm + arm64 diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds index b89d75f606..602cb089e9 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.builds @@ -19,6 +19,10 @@ Windows_NT x86 + + Windows_NT + arm + Windows_NT arm64 diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.pkgproj b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.pkgproj index d1f00d62d6..f0867a05f9 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.pkgproj +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostPolicy.pkgproj @@ -6,7 +6,7 @@ $(HostPolicyVersion) true true - x64;x86;arm64; + x64;x86;arm;arm64; $(PackagesOutputPath) true true @@ -22,6 +22,9 @@ x86 + + arm + arm64 diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds index 37c235d50a..0378df76a8 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.builds @@ -19,6 +19,10 @@ Windows_NT x86 + + Windows_NT + arm + Windows_NT arm64 diff --git a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.pkgproj b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.pkgproj index b6485251a3..fefbe89cd9 100644 --- a/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.pkgproj +++ b/pkg/projects/Microsoft.NETCore.DotNetHost/Microsoft.NETCore.DotNetHostResolver.pkgproj @@ -6,7 +6,7 @@ $(HostResolverVersion) true true - x64;x86;arm64; + x64;x86;arm;arm64; $(PackagesOutputPath) true true @@ -22,6 +22,9 @@ x86 + + arm + arm64 diff --git a/src/corehost/cli/dll/CMakeLists.txt b/src/corehost/cli/dll/CMakeLists.txt index b920967f59..6a12f6f79b 100644 --- a/src/corehost/cli/dll/CMakeLists.txt +++ b/src/corehost/cli/dll/CMakeLists.txt @@ -60,3 +60,8 @@ if(WIN32) endif() add_library(hostpolicy SHARED ${SOURCES} ${RESOURCES}) +# Specify the import library to link against for Arm32 build since the default set is minimal +if (WIN32 AND CLI_CMAKE_PLATFORM_ARCH_ARM) + target_link_libraries(hostpolicy shell32.lib) +endif() + diff --git a/src/corehost/cli/exe/CMakeLists.txt b/src/corehost/cli/exe/CMakeLists.txt index 138cf9e716..19b8f89132 100644 --- a/src/corehost/cli/exe/CMakeLists.txt +++ b/src/corehost/cli/exe/CMakeLists.txt @@ -46,6 +46,11 @@ endif() add_executable(dotnet ${SOURCES} ${RESOURCES}) install(TARGETS dotnet DESTINATION bin) +# Specify the import library to link against for Arm32 build since the default set is minimal +if (WIN32 AND CLI_CMAKE_PLATFORM_ARCH_ARM) + target_link_libraries(dotnet shell32.lib) +endif() + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries (dotnet "dl" "pthread") endif() diff --git a/src/corehost/cli/fxr/CMakeLists.txt b/src/corehost/cli/fxr/CMakeLists.txt index af6eb64686..9838576a76 100644 --- a/src/corehost/cli/fxr/CMakeLists.txt +++ b/src/corehost/cli/fxr/CMakeLists.txt @@ -57,4 +57,9 @@ if(WIN32) endif() add_library(hostfxr SHARED ${SOURCES} ${RESOURCES}) +# Specify the import library to link against for Arm32 build since the default set is minimal +if (WIN32 AND CLI_CMAKE_PLATFORM_ARCH_ARM) + target_link_libraries(hostfxr shell32.lib) +endif() + diff --git a/src/corehost/cli/setup.cmake b/src/corehost/cli/setup.cmake index ef16da0366..6d7bf52e94 100644 --- a/src/corehost/cli/setup.cmake +++ b/src/corehost/cli/setup.cmake @@ -87,6 +87,15 @@ else() message(FATAL_ERROR "Unknown target architecture") endif() +# Specify the Windows SDK to be used for Arm builds +if (WIN32 AND CLI_CMAKE_PLATFORM_ARCH_ARM) + if(NOT DEFINED CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION OR CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION STREQUAL "" ) + message(FATAL_ERROR "Windows SDK is required for the Arm32 build.") + else() + message("Using Windows SDK version ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") + endif() +endif () + if("${CLI_CMAKE_RUNTIME_ID}" STREQUAL "") message(FATAL_ERROR "Runtime ID not specified") else() diff --git a/src/corehost/common/pal.windows.cpp b/src/corehost/common/pal.windows.cpp index 8d82f9458c..fecddf90e4 100644 --- a/src/corehost/common/pal.windows.cpp +++ b/src/corehost/common/pal.windows.cpp @@ -161,7 +161,6 @@ bool pal::get_default_servicing_directory(string_t* recv) if (!pal::getenv(_X("ProgramFiles(x86)"), recv)) #else // In WOW64 mode, PF maps to PFx86. - // For Arm64, there is no wow mode as of now, so this should be fine if (!pal::getenv(_X("ProgramFiles"), recv)) #endif {