Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.73] Port Desktop DLL to ARM64EC #13478

Merged
merged 14 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ado/config/PoliCheckExclusions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ NOTE: Use ALL CAPS for excluded terms below else it will silently ignore them. A
<PoliCheckExclusions>
<!-- Each of these exclusions is a folder name -if \[name]\exists in the file path, it will be skipped -->
<Exclusion Type="FolderPathFull">
.GIT|ARM|ARM64|BUILD|DIST|GENERATED FILES|NODE_MODULES|OUTPUT|TARGET|X64|X86|PATCHES|LIB-COMMONJS
.GIT|ARM|ARM64|ARM64EC|BUILD|DIST|GENERATED FILES|NODE_MODULES|OUTPUT|TARGET|X64|X86|PATCHES|LIB-COMMONJS
</Exclusion>
<!-- Each of these exclusions is a folder name -if any folder or file starts with "\[name]", it will be skipped -->
<Exclusion Type="FolderPathStart">
Expand Down
24 changes: 12 additions & 12 deletions .ado/jobs/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ parameters:
- Name: X86Debug
BuildConfiguration: Debug
BuildPlatform: x86
- Name: Arm64Debug
- Name: ARM64ECDebug
BuildConfiguration: Debug
BuildPlatform: ARM64
- Name: Arm64Release
BuildPlatform: ARM64EC
- Name: ARM64ECRelease
BuildConfiguration: Release
BuildPlatform: ARM64
BuildPlatform: ARM64EC
- Name: X86Release
BuildConfiguration: Release
BuildPlatform: x86
Expand All @@ -47,19 +47,19 @@ parameters:
- Name: X86Debug
BuildConfiguration: Debug
BuildPlatform: x86
- Name: Arm64Debug
- Name: ARM64ECDebug
BuildConfiguration: Debug
BuildPlatform: ARM64
- Name: Arm64Release
BuildPlatform: ARM64EC
- Name: ARM64ECRelease
BuildConfiguration: Release
BuildPlatform: ARM64
BuildPlatform: ARM64EC
- Name: X86Release
BuildConfiguration: Release
BuildPlatform: x86
- X86ReleaseFabric:
- Name: X86ReleaseFabric # Specifically built so binskim / tests get run on fabric
BuildConfiguration: Release
BuildPlatform: x86
UseFabric: true
UseFabric: true

jobs:
- ${{ each config in parameters.buildMatrix }}:
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:

- template: ../templates/discover-google-test-adapter.yml

- ${{ if ne(matrix.BuildPlatform, 'ARM64') }}:
- ${{ if ne(matrix.BuildPlatform, 'ARM64EC') }}:
- task: VSTest@2
displayName: Run Desktop Unit Tests
timeoutInMinutes: 5 # Set smaller timeout , due to hangs
Expand All @@ -159,7 +159,7 @@ jobs:
failOnMinTestsNotRun: true

# Suspected debug assert in TestRunner hanging tests randomly. Run only on Release for now.
- ${{ if and(eq(matrix.BuildConfiguration, 'Release'), ne(variables['Desktop.IntegrationTests.SkipRNTester'], true), ne(matrix.BuildPlatform, 'ARM64')) }}:
- ${{ if and(eq(matrix.BuildConfiguration, 'Release'), ne(variables['Desktop.IntegrationTests.SkipRNTester'], true), ne(matrix.BuildPlatform, 'ARM64EC')) }}:
- task: PowerShell@2
displayName: Set up test servers
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .ado/jobs/nuget-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
dependsOn:
- DesktopX64Release
- DesktopX86Debug
- DesktopARM64ECRelease

pool: ${{ parameters.AgentPool.Small }}
timeoutInMinutes: 30 # how long to run the job before automatically cancelling
Expand All @@ -31,3 +32,5 @@ jobs:
configuration: Release
- platform: x86
configuration: Debug
- platform: ARM64EC
configuration: Release
18 changes: 9 additions & 9 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ parameters:
BuildConfiguration: Release
BuildPlatform: x86
UseFabric: false
- Name: ARM64Debug
- Name: ARM64ECDebug
BuildConfiguration: Debug
BuildPlatform: ARM64
BuildPlatform: ARM64EC
UseFabric: false
- Name: ARM64Release
- Name: ARM64ECRelease
BuildConfiguration: Release
BuildPlatform: ARM64
BuildPlatform: ARM64EC
UseFabric: false
- Name: X64DebugFabric
BuildConfiguration: Debug
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
persistCredentials: false # We're going to use rnbot's git creds to publish

- powershell: gci env:/BUILD_*
displayName: Show build information
displayName: Show build information

- template: templates/prepare-js-env.yml

Expand Down Expand Up @@ -159,13 +159,13 @@ jobs:
displayName: 📒 Generate Manifest Npm
inputs:
BuildDropPath: $(System.DefaultWorkingDirectory)

- task: PublishPipelineArtifact@1
displayName: 📒 Publish Manifest Npm
inputs:
artifactName: SBom-$(System.JobAttempt)
targetPath: $(System.DefaultWorkingDirectory)/_manifest

- template: templates/publish-version-vars.yml

- ${{ each matrix in parameters.desktopBuildMatrix }}:
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
BuildPlatform: x86
Arm64Debug:
BuildConfiguration: Debug
BuildPlatform: ARM64
BuildPlatform: ARM64
pool: ${{ parameters.AgentPool.Large }}

steps:
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
- platform: x86
configuration: Release
- platform: ARM64
configuration: Release
configuration: Release
- platform: x64
configuration: Debug
- platform: x86
Expand Down
1 change: 1 addition & 0 deletions .ado/templates/prepare-build-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parameters:
# - x86
# - x64
# - ARM64
# - ARM64EC
- name: configuration
type: string
# Publish still using runtime matrix
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Port Desktop DLL to ARM64EC (#13320)",
"packageName": "react-native-windows",
"email": "julio.rocha@microsoft.com",
"dependentChangeType": "patch"
}
8 changes: 8 additions & 0 deletions vnext/Common/Common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(ReactNativeWindowsDir)PropertySheets\React.Cpp.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down
22 changes: 20 additions & 2 deletions vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
Expand All @@ -13,6 +17,10 @@
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down Expand Up @@ -99,6 +107,12 @@
WindowsApp_downlevel.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies Condition="'$(Platform)' == 'ARM64EC'">
%(AdditionalDependencies);
Bcrypt.lib;
Chakrart.lib;
Pathcch.lib
</AdditionalDependencies>
<DelayLoadDLLs>Chakra.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<Link Condition="'$(UseFabric)' == 'true'">
Expand All @@ -116,6 +130,11 @@
<ModuleDefinitionFile>react-native-win32.x64.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM64EC'">
<Link>
<ModuleDefinitionFile>react-native-win32.x64.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="('$(Platform)'=='Win32' OR '$(Platform)'=='x86')">
<Link>
<ModuleDefinitionFile>react-native-win32.x86.def</ModuleDefinitionFile>
Expand Down Expand Up @@ -155,7 +174,6 @@
<ItemGroup>
<PackageReference Include="boost" Version="1.76.0.0" />
<PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" />
<PackageReference Include="ReactWindows.OpenSSL.StdCall.Static" Version="1.0.2-p.5" />
<PackageReference Include="$(V8PackageName)" Version="$(V8Version)" Condition="'$(UseV8)' == 'true'" />
</ItemGroup>
<Choose>
Expand All @@ -171,4 +189,4 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="GetTargetFileName" Returns="$(OutDir)$(TargetName).dll" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@
<EnableWinRtLeanAndMean>false</EnableWinRtLeanAndMean>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down
9 changes: 8 additions & 1 deletion vnext/Desktop/React.Windows.Desktop.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
Expand All @@ -13,6 +17,10 @@
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down Expand Up @@ -275,7 +283,6 @@
<PackageReference Include="boost" Version="1.76.0.0" />
<PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.JavaScript.Hermes" Version="$(HermesVersion)" />
<PackageReference Include="ReactWindows.OpenSSL.StdCall.Static" Version="1.0.2-p.5" />
<PackageReference Include="$(V8PackageName)" Version="$(V8Version)" Condition="'$(UseV8)' == 'true'" />
<PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(UseWinUI3)'=='true'" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions vnext/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Restore" Properties="RestoreProjectStyle=PackagesConfig;RestorePackagesConfig=true;RestoreUseStaticGraphEvaluation=false" />
</Target>

<PropertyGroup Label="WindowsAppSDKOverrides" Condition="'$(Platform)' == 'ARM64EC'">
<Ixp-Platform>win10-x64</Ixp-Platform>
<_WindowsAppSDKFoundationPlatform>x64</_WindowsAppSDKFoundationPlatform>
<_MrtCoreRuntimeIdentifier>x64</_MrtCoreRuntimeIdentifier>
</PropertyGroup>
</Project>
10 changes: 9 additions & 1 deletion vnext/Folly/Folly.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
Expand All @@ -25,6 +29,10 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand Down Expand Up @@ -279,7 +287,7 @@
SourceUrl="https://github.com/facebook/folly/archive/v$(FollyVersion).zip"
DestinationFileName="$(FollyZipFile)"
DestinationFolder="$(FollyZipDir)"
Retries="10"/>
Retries="10" />
</Target>
<Target Name="UnzipFolly" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFolly">
<Message Condition="!Exists('$(FollyDir)folly\dynamic.h')" Importance="High" Text="Unzipping folly to $([MSBuild]::NormalizePath($(FollyDir)..))." />
Expand Down
Loading
Loading