-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
NativeAOT ARM64 libraries testing #64373
Conversation
Enable ARM64 libraries testing for NativeAOT. * Copy the crosstargeting build approach from crossgen2. We'll now build two ILC compilers when targeting ARM64 from x64: an arm64-hosted one that is useless on the build machine, and a x64-hosted one, that will work on the build machine. The `ILCompiler.csproj/props/_crossarch.csproj` projects mirror crossgen's approach. * Limit the number of libraries tests to one. Hopefully it avoids the build races that we'd see until we can update the repo build to .NET 7 Preview 1. * Create an ARM64 NativeAOT CI leg that sends the libraries tests to Helix to run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, just a few questions about how the cross-arch stuff is supposed to work
@@ -22,11 +22,15 @@ | |||
|
|||
<PropertyGroup Condition="'$(TestNativeAot)' == 'true'"> | |||
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath> | |||
<IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath> | |||
<CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">clang-9</CppCompilerAndLinker> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a variable for this? I can't remember -- maybe only in CMake, since that's where we do all the native compilation otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we only pass it directly to the native build scripts as the -clang9
argument. The managed build doesn't care about it. I could introduce a new property and pass it all the way from the YAML but it's unclear it would be an improvement - it's not a variable in YAML either so if this ever changes, we'll have to troubleshoot the CI either way.
@@ -0,0 +1,8 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the purpose of the crossarch project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This builds a version of ILC that is x64 hosted, even when we otherwise target arm or arm64. It matches what ../crossgen2/crossgen2_crossarch.csproj does. When we're crosstargeting to arm64, we wouldn't be able to run the ilc that we just built because it's for arm64 but the build machine is x64.
The ugly hardcoding of x64 matches what crossgen2 does - it captures the reality that when we're crossbuilding to arm64, the host is x64. I guess I could use HostArch, but this is a copy paste from crossgen2_crossarch.csproj.
@@ -0,0 +1,8 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<PropertyGroup> | |||
<CrossHostArch>x64</CrossHostArch> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always x64? We don't have to worry about arm64?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to $(BuildArchitecture)
to futureproof for the day when we crossbuild from a non-x64 host operating system. Also updated in the crossgen2 project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Although, staging is failing -- might be unrelated, but probably worth an investigation. |
The
Doesn't look related to this pull request. Cc @radical for odd WASM pipeline run. |
re:wasm, I'm not sure what happened here. Like you said, it is using a linux image - https://dev.azure.com/dnceng/public/_build/results?buildId=1596254&view=logs&j=55f4943c-f76d-585b-7250-deab324f0a54&t=dcc862e9-ab6a-417b-b42c-fd7ec9c6c2ea
Another windows job in the same build (
@akoeplinger any ideas? |
@radical it looks like that build job shouldn't have run on a Linux image since it's building a Windows config: |
Any idea what might have caused this? Anything that we need to do? |
It looks very weird. If I look at the expanded .yml via https://dev.azure.com/dnceng/public/_apis/build/builds/1596254/logs?logid=1 the job demands the Windows image: displayName: Build Browser wasm windows Release LibraryTests_AOT
pool:
name: NetCore1ESPool-Public
demands:
- ImageOverride -equals Build.Windows.10.Amd64.VS2019.Open If it doesn't happen again I'd say it was a transient blip in the 1ES pool provider? |
Enable ARM64 libraries testing for NativeAOT.
ILCompiler.csproj/props/_crossarch.csproj
projects mirror crossgen's approach.