Add ARM64 to new arch templates (#12635)

## Description

This PR fixes up the new `cpp-lib` and `cpp-app` templates to support targeting ARM64, and adds ARM64 builds to the CI/PR matrix.

### Type of Change
- New feature (non-breaking change which adds functionality)

### Why
To enable native builds of ARM64

Closes #12633 

### What
Added the proper configurations to 

## Screenshots
N/A

## Testing
Verified the apps build in CI

## Changelog
Should this change be included in the release notes: _yes_

Updated the experimental `cpp-lib` and `cpp-app` templates to support targeting ARM64.
This commit is contained in:
Jon Thysell 2024-01-25 11:32:49 -08:00 коммит произвёл GitHub
Родитель 5217a033ad
Коммит 404db90eff
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 56 добавлений и 8 удалений

Просмотреть файл

@ -22,6 +22,11 @@ parameters:
configuration: Debug
platform: x86
additionalRunArguments: --no-autolink
- Name: FabricArm64Release
template: cpp-app
configuration: Release
platform: ARM64
additionalRunArguments: --no-autolink --no-deploy
- Name: FabricLibX64Release
template: cpp-lib
configuration: Release
@ -32,6 +37,11 @@ parameters:
configuration: Debug
platform: x86
additionalRunArguments:
- Name: FabricLibArm64Release
template: cpp-lib
configuration: Release
platform: ARM64
additionalRunArguments: --no-deploy
- BuildEnvironment: Continuous
Matrix:
- Name: FabricX64Debug
@ -53,7 +63,16 @@ parameters:
template: cpp-app
configuration: Release
platform: x86
additionalRunArguments: --no-autolink
- Name: FabricArm64Debug
template: cpp-app
configuration: Debug
platform: ARM64
additionalRunArguments: --no-autolink --no-deploy
- Name: FabricArm64Release
template: cpp-app
configuration: Release
platform: ARM64
additionalRunArguments: --no-autolink --no-deploy
- Name: FabricLibX64Debug
template: cpp-lib
configuration: Debug
@ -74,6 +93,16 @@ parameters:
configuration: Release
platform: x86
additionalRunArguments:
- Name: FabricLibArm64Debug
template: cpp-lib
configuration: Debug
platform: ARM64
additionalRunArguments: --no-deploy
- Name: FabricLibArm64Release
template: cpp-lib
configuration: Release
platform: ARM64
additionalRunArguments: --no-deploy
jobs:
- ${{ each config in parameters.buildMatrix }}:
- ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}:

2
.vscode/settings.json поставляемый
Просмотреть файл

@ -145,7 +145,7 @@
"clang-format.executable": "${workspaceRoot}/node_modules/.bin/clang-format",
"typescript.tsdk": "node_modules\\typescript\\lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"dotnet.defaultSolution": "disable"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Add ARM64 to new arch templates",
"packageName": "react-native-windows",
"email": "jthysell@microsoft.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -36,13 +36,15 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@ -109,8 +111,10 @@
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -37,6 +37,14 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>