Skip to content

Commit b83e1e1

Browse files
authored
Enable building native projects for windows arm64 (#55145)
Fixes building aspnetcore for windows arm64 in the VMR. ## Description Right now the native projects are only built when targetting x86/x64 architectures. This causes an issue in the VMR because we're building windows arm64 in a separate job and aspnetcore fails because of the missing native assets. The desktop msbuild build for the native projects was disabled for arm64, enable it to match the other architectures.
1 parent 0638139 commit b83e1e1

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

eng/Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
Include="$(RepoRoot)src\Installers\Rpm\**\*.*proj" />
115115
</ItemGroup>
116116

117-
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">
117+
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">
118118
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" />
119119
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" />
120120
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=arm64" />

eng/build.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Run publishing.
5252
Debug or Release
5353
5454
.PARAMETER Architecture
55-
The CPU architecture to build for (x64, x86, arm). Default=x64
55+
The CPU architecture to build for (x64, x86, arm64). Default=x64
5656
5757
.PARAMETER Projects
5858
A list of projects to build. Globbing patterns are supported, such as "$(pwd)/**/*.csproj"
@@ -66,7 +66,7 @@ You can also use -NoBuildManaged to suppress this project type.
6666
6767
.PARAMETER BuildNative
6868
Build native projects (C++).
69-
This is the default for x64 and x86 builds but useful when you want to build _only_ native projects.
69+
This is the default but useful when you want to build _only_ native projects.
7070
You can use -NoBuildNative to suppress this project type.
7171
7272
.PARAMETER BuildNodeJS
@@ -150,7 +150,7 @@ param(
150150
[ValidateSet('Debug', 'Release')]
151151
$Configuration,
152152

153-
[ValidateSet('x64', 'x86', 'arm', 'arm64')]
153+
[ValidateSet('x64', 'x86', 'arm64')]
154154
$Architecture = 'x64',
155155

156156
# A list of projects which should be built.
@@ -316,8 +316,7 @@ if ($BuildNodeJS) { $dotnetBuildArguments += "/p:BuildNodeJS=true" }
316316
# Don't bother with two builds if just one will build everything. Ignore super-weird cases like
317317
# "-Projects ... -NoBuildJava -NoBuildManaged -NoBuildNodeJS". An empty `./build.ps1` command will build both
318318
# managed and native projects.
319-
$performDesktopBuild = ($BuildInstallers -and $Architecture -ne "arm") -or `
320-
($BuildNative -and -not $Architecture.StartsWith("arm", [System.StringComparison]::OrdinalIgnoreCase))
319+
$performDesktopBuild = $BuildInstallers -or $BuildNative
321320
$performDotnetBuild = $BuildJava -or $BuildManaged -or $BuildNodeJS -or `
322321
($All -and -not ($NoBuildJava -and $NoBuildManaged -and $NoBuildNodeJS)) -or `
323322
($Projects -and -not ($BuildInstallers -or $specifiedBuildNative))

eng/scripts/RunHelix.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
.PARAMETER RunQuarantinedTests
2020
By default quarantined tests are not run. Set this to $true to run only the quarantined tests.
2121
.PARAMETER TargetArchitecture
22-
The CPU architecture to build for (x64, x86, arm). Default=x64
22+
The CPU architecture to build for (x64, x86, arm64). Default=x64
2323
.PARAMETER MSBuildArguments
2424
Additional MSBuild arguments to be passed through.
2525
#>
@@ -31,7 +31,7 @@ param(
3131
[string]$HelixQueues = "Windows.10.Amd64.Server20H2.Open",
3232
[switch]$RunQuarantinedTests,
3333

34-
[ValidateSet('x64', 'x86', 'arm', 'arm64')]
34+
[ValidateSet('x64', 'x86', 'arm64')]
3535
[string]$TargetArchitecture = "x64",
3636

3737
# Capture the rest

0 commit comments

Comments
 (0)