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

CG2 test followups #106929

Open
4 tasks
am11 opened this issue Aug 24, 2024 · 1 comment
Open
4 tasks

CG2 test followups #106929

am11 opened this issue Aug 24, 2024 · 1 comment

Comments

@am11
Copy link
Member

am11 commented Aug 24, 2024

#80154 followups:

  • __TestBuildMode: crossgen2 (as in git grep __TestBuildMode.*crossgen2) should use helix so we can revert 2324602 (i.e. use published crossgen2.exe instead of dotnet crossgen2.dll)

  • Crossgen2Tool (as in git grep '<Crossgen2Tool' should similarly use published crossgen2.exe instead of crossgen2.dll and while working on it, we should deduplicate

      runtime/src/tasks/Crossgen2Tasks/PrepareForReadyToRunCompilation.cs
      runtime/src/tasks/Crossgen2Tasks/ResolveReadyToRunCompilers.cs
      runtime/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs
    

    and

      sdk/src/Tasks/Microsoft.NET.Build.Tasks/PrepareForReadyToRunCompilation.cs
      sdk/src/Tasks/Microsoft.NET.Build.Tasks/ResolveReadyToRunCompilers.cs
      sdk/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs
    
  • Remove apphost.exe requirement from crossgen2_publish; some ResolveFrameworkRef.. type of target make it mandatory during the publish. It will allow us to delete this two-step workaround

    <MakeDir Condition="'$(Crossgen2Supported)' == 'true'" Directories="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)" />
    <Copy
    SourceFiles="$(_apphostPath)"
    DestinationFiles="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)\apphost$(ExeSuffix)"
    Condition="'$(Crossgen2Supported)' == 'true'" />

  • Integrate src/tests/build.sh/cmd with top-level build.sh/cmd, so when we use build.sh -c release -rc checked, the corresponding test command is src/tests/build.sh -release -p:RuntimeConfiguration=checked instead of what we have now src/tests/build.sh -checked -p:LibrariesConfiguration=release. This will allow us to remove workaround like

    <!-- Copy apphost to crossgen2_publish directory.
    The default configuration between product and tests are flipped. When we build project like:
    `build -c debug -rc checked`, the corresponding test command is `src/tests/build -checked -p:LibrariesConfiguration=debug`,
    instead of `-debug -p:RuntimeConfiguration=checked`. That forces us to either pass the
    `HostConfiguration=debug` explicitly or fix this disparity; both of which will break the dev workflow.
    As a workaround, we will first check if the directory pointed by `HostConfiguration` exists, then check
    `LibrariesConfiguration`.
    -->
    <PropertyGroup Condition="'$(Crossgen2Supported)' == 'true'">
    <_targetOS>$(TargetOS)</_targetOS>
    <_targetOS Condition="'$(_targetOS)' == 'windows'">win</_targetOS>
    <_apphostPath Condition="Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath>
    <_apphostPath Condition="'$(_apphostPath)' == '' and Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath>
    <_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(ToolsConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(ToolsConfiguration)</_toolsConfiguration>
    <_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(LibrariesConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(LibrariesConfiguration)</_toolsConfiguration>
    </PropertyGroup>

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Aug 24, 2024
@steveisok steveisok added this to the 10.0.0 milestone Aug 26, 2024
@steveisok
Copy link
Member

/cc @ivdiazsa

@ivdiazsa ivdiazsa removed the untriaged New issue has not been triaged by the area owner label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants