Skip to content

Enable building native projects for windows arm64 #55145

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

Merged
merged 1 commit into from
Apr 16, 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 eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
Include="$(RepoRoot)src\Installers\Rpm\**\*.*proj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" />
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" />
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=arm64" />
Expand Down
9 changes: 4 additions & 5 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Run publishing.
Debug or Release

.PARAMETER Architecture
The CPU architecture to build for (x64, x86, arm). Default=x64
The CPU architecture to build for (x64, x86, arm64). Default=x64

.PARAMETER Projects
A list of projects to build. Globbing patterns are supported, such as "$(pwd)/**/*.csproj"
Expand All @@ -66,7 +66,7 @@ You can also use -NoBuildManaged to suppress this project type.

.PARAMETER BuildNative
Build native projects (C++).
This is the default for x64 and x86 builds but useful when you want to build _only_ native projects.
This is the default but useful when you want to build _only_ native projects.
You can use -NoBuildNative to suppress this project type.

.PARAMETER BuildNodeJS
Expand Down Expand Up @@ -150,7 +150,7 @@ param(
[ValidateSet('Debug', 'Release')]
$Configuration,

[ValidateSet('x64', 'x86', 'arm', 'arm64')]
[ValidateSet('x64', 'x86', 'arm64')]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32bit arm on windows was removed in .NET 5 so we don't need to check it anymore

$Architecture = 'x64',

# A list of projects which should be built.
Expand Down Expand Up @@ -316,8 +316,7 @@ if ($BuildNodeJS) { $dotnetBuildArguments += "/p:BuildNodeJS=true" }
# Don't bother with two builds if just one will build everything. Ignore super-weird cases like
# "-Projects ... -NoBuildJava -NoBuildManaged -NoBuildNodeJS". An empty `./build.ps1` command will build both
# managed and native projects.
$performDesktopBuild = ($BuildInstallers -and $Architecture -ne "arm") -or `
($BuildNative -and -not $Architecture.StartsWith("arm", [System.StringComparison]::OrdinalIgnoreCase))
$performDesktopBuild = $BuildInstallers -or $BuildNative
$performDotnetBuild = $BuildJava -or $BuildManaged -or $BuildNodeJS -or `
($All -and -not ($NoBuildJava -and $NoBuildManaged -and $NoBuildNodeJS)) -or `
($Projects -and -not ($BuildInstallers -or $specifiedBuildNative))
Expand Down
4 changes: 2 additions & 2 deletions eng/scripts/RunHelix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
.PARAMETER RunQuarantinedTests
By default quarantined tests are not run. Set this to $true to run only the quarantined tests.
.PARAMETER TargetArchitecture
The CPU architecture to build for (x64, x86, arm). Default=x64
The CPU architecture to build for (x64, x86, arm64). Default=x64
.PARAMETER MSBuildArguments
Additional MSBuild arguments to be passed through.
#>
Expand All @@ -31,7 +31,7 @@ param(
[string]$HelixQueues = "Windows.10.Amd64.Server20H2.Open",
[switch]$RunQuarantinedTests,

[ValidateSet('x64', 'x86', 'arm', 'arm64')]
[ValidateSet('x64', 'x86', 'arm64')]
[string]$TargetArchitecture = "x64",

# Capture the rest
Expand Down