Skip to content

Commit

Permalink
Delete Windows arm32 support (#86065)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas authored May 11, 2023
1 parent 0b5f137 commit 418aa8a
Show file tree
Hide file tree
Showing 32 changed files with 21 additions and 3,084 deletions.
1 change: 0 additions & 1 deletion .vsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.Component.VC.Tools.ARM",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
Expand Down
1 change: 0 additions & 1 deletion docs/infra/test-configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ All builds are
- Windows 10 x64 Client VS2019
- x64 Release
- x86 Release
- arm32 Release
- arm64 Release
- Ubuntu 18.04 x64
- Linux x64 Release
Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ The repo can be built for the following platforms, using the provided setup and
| :---- | :------: | :------: | :------: | :------: |
| x64 | ✔ | ✔ | ✔ | ✔ |
| x86 | ✔ | | | |
| ARM | ✔ | ✔ | | |
| ARM64 | ✔ | ✔ | ✔ | |
| Arm32 | | ✔ | | |
| Arm64 | ✔ | ✔ | ✔ | |
| | [Requirements](requirements/windows-requirements.md) | [Requirements](requirements/linux-requirements.md) | [Requirements](requirements/macos-requirements.md) | [Requirements](requirements/freebsd-requirements.md)

Additionally, keep in mind that cloning the full history of this repo takes roughly 400-500 MB of network transfer, inflating to a repository that can consume somewhere between 1 to 1.5 GB. A build of the repo can take somewhere between 10 and 20 GB of space for a single OS and Platform configuration depending on the portions of the product built. This might increase over time, so consider this to be a minimum bar for working with this codebase.
Expand Down
6 changes: 3 additions & 3 deletions docs/workflow/building/coreclr/cross-building.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Cross-Building for Different Architectures and Operating Systems

* [Windows Cross-Building](#windows-cross-building)
* [Cross-Compiling for ARM32 and ARM64 on Windows](#cross-compiling-for-arm32-and-arm64-on-windows)
* [Cross-Compiling for ARM64 on Windows](#cross-compiling-for-arm64-on-windows)
* [Cross-Compiling for x86 on Windows](#cross-compiling-for-x86-on-windows)
* [macOS Cross-Building](#macos-cross-building)
* [Linux Cross-Building](#linux-cross-building)
Expand All @@ -21,9 +21,9 @@ This guide will go more in-depth on how to do cross-building across multiple ope

This section will go over cross-compiling on Windows. Currently, Windows allows you to cross-compile from x64 to basically any other architecture.

### Cross-Compiling for ARM32 and ARM64 on Windows
### Cross-Compiling for ARM64 on Windows

To do cross-compilation for ARM32/ARM64 on Windows, first make sure you have the appropriate tools and Windows SDK installed. This is described in detail in the [Windows requirements doc](/docs/workflow/requirements/windows-requirements.md#visual-studio).
To do cross-compilation for ARM64 on Windows, first make sure you have the appropriate tools and Windows SDK installed. This is described in detail in the [Windows requirements doc](/docs/workflow/requirements/windows-requirements.md#visual-studio).

Once you have all the required dependencies, it is a straightforward process. Windows knows how to cross-build behind curtains, so all you have to do is specify which architecture you want to build for:

Expand Down
3 changes: 1 addition & 2 deletions docs/workflow/requirements/windows-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/). The
* It's recommended to use **Workloads** installation approach. The following are the minimum requirements:
* **.NET Desktop Development** with all default components,
* **Desktop Development with C++** with all default components.
* To build for Arm32 or Arm64, make sure that you have the right architecture-specific compilers installed. In the **Individual components** window, in the **Compilers, build tools, and runtimes** section:
* For Arm32, check the box for _MSVC v143* VS 2022 C++ ARM build tools (Latest)_.
* To build for Arm64, make sure that you have the right architecture-specific compilers installed. In the **Individual components** window, in the **Compilers, build tools, and runtimes** section:
* For Arm64, check the box for _MSVC v143* VS 2022 C++ ARM64 build tools (Latest)_.
* To build the tests, you will need some additional components:
* **C++/CLI support for v142 build tools (Latest)**.
Expand Down
13 changes: 0 additions & 13 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,6 @@
Category="clr" />
</ItemGroup>

<ItemGroup Condition="(('$(ClrRuntimeBuildSubsets)' != '' and '$(PrimaryRuntimeFlavor)' == 'CoreCLR' and '$(TargetsMobile)' != 'true') or $(_subset.Contains('+clr.crossarchtools+'))) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' == 'x64'">
<ProjectToBuild
Include="$(CoreClrProjectRoot)runtime.proj"
AdditionalProperties="%(AdditionalProperties);
ClrCrossComponentsSubset=true;
HostArchitecture=x86;
PgoInstrument=false;
NoPgoOptimize=true;
CrossBuild=false;
CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1"
Category="clr" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+clr.paltestlist+'))">
<ProjectToBuild Include="$(CoreClrProjectRoot)pal/tests/palsuite/producepaltestlist.proj" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/mono/templates/workloads-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ jobs:
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Sdk*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Wasi*.nupkg
IntermediateArtifacts/MonoRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Templates*.nupkg
IntermediateArtifacts/windows_arm/Shipping/Microsoft.NETCore.App.Runtime.win-arm*.nupkg
IntermediateArtifacts/windows_arm64/Shipping/Microsoft.NETCore.App.Runtime.win-arm64*.nupkg
IntermediateArtifacts/windows_x64/Shipping/Microsoft.NETCore.App.Runtime.win-x64*.nupkg
IntermediateArtifacts/windows_x86/Shipping/Microsoft.NETCore.App.Runtime.win-x86*.nupkg
Expand Down
25 changes: 1 addition & 24 deletions src/coreclr/CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,6 @@
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ]
},
{
"name": "windows.arm.Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=arm",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_arm" ]
},
{
"name": "windows.arm.Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=arm",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_arm" ],
"variables": []
},
{
"name": "windows.arm64.Debug",
"generator": "Ninja",
Expand All @@ -98,4 +75,4 @@
"variables": []
}
]
}
}
15 changes: 3 additions & 12 deletions src/coreclr/build-runtime.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ set __BuildAll=

set __TargetArchX64=0
set __TargetArchX86=0
set __TargetArchArm=0
set __TargetArchArm64=0

set __BuildTypeDebug=0
Expand Down Expand Up @@ -87,7 +86,6 @@ if /i "%1" == "--help" goto Usage
if /i "%1" == "-all" (set __BuildAll=1&shift&goto Arg_Loop)
if /i "%1" == "-x64" (set __TargetArchX64=1&shift&goto Arg_Loop)
if /i "%1" == "-x86" (set __TargetArchX86=1&shift&goto Arg_Loop)
if /i "%1" == "-arm" (set __TargetArchArm=1&shift&goto Arg_Loop)
if /i "%1" == "-arm64" (set __TargetArchArm64=1&shift&goto Arg_Loop)

if /i "%1" == "-debug" (set __BuildTypeDebug=1&shift&goto Arg_Loop)
Expand All @@ -101,7 +99,6 @@ REM don't add more, use the - syntax instead
if /i "%1" == "all" (set __BuildAll=1&shift&goto Arg_Loop)
if /i "%1" == "x64" (set __TargetArchX64=1&shift&goto Arg_Loop)
if /i "%1" == "x86" (set __TargetArchX86=1&shift&goto Arg_Loop)
if /i "%1" == "arm" (set __TargetArchArm=1&shift&goto Arg_Loop)
if /i "%1" == "arm64" (set __TargetArchArm64=1&shift&goto Arg_Loop)

if /i "%1" == "debug" (set __BuildTypeDebug=1&shift&goto Arg_Loop)
Expand Down Expand Up @@ -165,7 +162,7 @@ if defined VCINSTALLDIR (

if defined __BuildAll goto BuildAll

set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64
set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm64
if %__TotalSpecifiedTargetArch% GTR 1 (
echo Error: more than one build architecture specified, but "all" not specified.
goto Usage
Expand All @@ -176,7 +173,6 @@ if "%__ProcessorArch%"=="" set __ProcessorArch=%PROCESSOR_ARCHITECTURE%

if %__TargetArchX64%==1 set __TargetArch=x64
if %__TargetArchX86%==1 set __TargetArch=x86
if %__TargetArchArm%==1 set __TargetArch=arm
if %__TargetArchArm64%==1 set __TargetArch=arm64
if "%__HostArch%" == "" set __HostArch=%__TargetArch%

Expand All @@ -191,10 +187,6 @@ if %__BuildTypeChecked%==1 set __BuildType=Checked
if %__BuildTypeRelease%==1 set __BuildType=Release

if %__EnforcePgo%==1 (
if %__TargetArchArm%==1 (
echo NOTICE: enforcepgo does nothing on arm architecture
set __EnforcePgo=0
)
if %__TargetArchArm64%==1 (
echo NOTICE: enforcepgo does nothing on arm64 architecture
set __EnforcePgo=0
Expand Down Expand Up @@ -451,7 +443,7 @@ REM ============================================================================

set __TargetArchList=

set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64
set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm64
if %__TotalSpecifiedTargetArch% EQU 0 (
REM Nothing specified means we want to build all architectures.
set __TargetArchList=x64 x86 arm arm64
Expand All @@ -461,7 +453,6 @@ REM Otherwise, add all the specified architectures to the list.

if %__TargetArchX64%==1 set __TargetArchList=%__TargetArchList% x64
if %__TargetArchX86%==1 set __TargetArchList=%__TargetArchList% x86
if %__TargetArchArm%==1 set __TargetArchList=%__TargetArchList% arm
if %__TargetArchArm64%==1 set __TargetArchList=%__TargetArchList% arm64

set __BuildTypeList=
Expand Down Expand Up @@ -545,7 +536,7 @@ echo All arguments are optional. The options are:
echo.
echo.-? -h -help --help: view this message.
echo -all: Builds all configurations and platforms.
echo Build architecture: one of -x64, -x86, -arm, -arm64 ^(default: -x64^).
echo Build architecture: one of -x64, -x86, -arm64 ^(default: -x64^).
echo Build type: one of -Debug, -Checked, -Release ^(default: -Debug^).
echo -component ^<name^> : specify this option one or more times to limit components built to those specified.
echo Allowed ^<name^>: hosts jit alljits runtime paltests iltools nativeaot spmi
Expand Down
17 changes: 0 additions & 17 deletions src/coreclr/debug/di/arm/floatconversion.asm

This file was deleted.

89 changes: 0 additions & 89 deletions src/coreclr/debug/ee/arm/dbghelpers.asm

This file was deleted.

2 changes: 0 additions & 2 deletions src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ if(CLR_CMAKE_TARGET_WIN32)
set(CLRDEBUGINFO_RESOURCE_NAME CLRDEBUGINFOWINDOWSX86)
elseif(CLR_CMAKE_TARGET_ARCH_ARM64)
set(CLRDEBUGINFO_RESOURCE_NAME CLRDEBUGINFOWINDOWSARM64)
elseif(CLR_CMAKE_TARGET_ARCH_ARM)
set(CLRDEBUGINFO_RESOURCE_NAME CLRDEBUGINFOWINDOWSARM)
endif(CLR_CMAKE_TARGET_ARCH_AMD64)

add_custom_target(
Expand Down
18 changes: 4 additions & 14 deletions src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static PTR_VOID GetUnwindDataBlob(TADDR moduleBase, PTR_RUNTIME_FUNCTION pRuntim

return pUnwindInfo;

#elif defined(TARGET_ARM) || defined(TARGET_ARM64)
#elif defined(TARGET_ARM64)

// if this function uses packed unwind data then at least one of the two least significant bits
// will be non-zero. if this is the case then there will be no xdata record to enumerate.
Expand All @@ -133,15 +133,9 @@ static PTR_VOID GetUnwindDataBlob(TADDR moduleBase, PTR_RUNTIME_FUNCTION pRuntim
PTR_UInt32 xdata = dac_cast<PTR_UInt32>(pRuntimeFunction->UnwindData + moduleBase);
int size = 4;

#if defined(TARGET_ARM)
// See https://docs.microsoft.com/en-us/cpp/build/arm-exception-handling
int unwindWords = xdata[0] >> 28;
int epilogScopes = (xdata[0] >> 23) & 0x1f;
#else
// See https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling
int unwindWords = xdata[0] >> 27;
int epilogScopes = (xdata[0] >> 22) & 0x1f;
#endif

if (unwindWords == 0 && epilogScopes == 0)
{
Expand Down Expand Up @@ -191,10 +185,6 @@ static int LookupUnwindInfoForMethod(uint32_t relativePc,
int low,
int high)
{
#ifdef TARGET_ARM
relativePc |= THUMB_CODE;
#endif

// Binary search the RUNTIME_FUNCTION table
// Use linear search once we get down to a small number of elements
// to avoid Binary search overhead.
Expand Down Expand Up @@ -504,7 +494,7 @@ uintptr_t CoffNativeCodeManager::GetConservativeUpperBoundForOutgoingArgs(Method
upperBound = dac_cast<TADDR>(pRegisterSet->GetFP() - ((PTR_UNWIND_INFO) pUnwindDataBlob)->FrameOffset);
}

#elif defined(TARGET_ARM) || defined(TARGET_ARM64)
#elif defined(TARGET_ARM64)
// Unwind the current method context to get the caller's stack pointer
// and use it as the upper bound for the callee
SIZE_T EstablisherFrame;
Expand Down Expand Up @@ -733,9 +723,9 @@ bool CoffNativeCodeManager::GetReturnAddressHijackInfo(MethodInfo * pMethodIn

// Decode the GC info for the current method to determine its return type
GcInfoDecoderFlags flags = DECODE_RETURN_KIND;
#if defined(TARGET_ARM) || defined(TARGET_ARM64)
#if defined(TARGET_ARM64)
flags = (GcInfoDecoderFlags)(flags | DECODE_HAS_TAILCALLS);
#endif // TARGET_ARM || TARGET_ARM64
#endif // TARGET_ARM64
GcInfoDecoder decoder(GCInfoToken(p), flags);

*pRetValueKind = GetGcRefKind(decoder.GetReturnKind());
Expand Down
5 changes: 0 additions & 5 deletions src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ struct T_RUNTIME_FUNCTION {
uint32_t EndAddress;
uint32_t UnwindInfoAddress;
};
#elif defined(TARGET_ARM)
struct T_RUNTIME_FUNCTION {
uint32_t BeginAddress;
uint32_t UnwindData;
};
#elif defined(TARGET_ARM64)
struct T_RUNTIME_FUNCTION {
uint32_t BeginAddress;
Expand Down
Loading

0 comments on commit 418aa8a

Please sign in to comment.