Locate crossgen2 by $(CoreCLRConfiguration) in ILCompiler.ReadyToRun.Tests#129548
Open
jtschuster wants to merge 1 commit into
Open
Locate crossgen2 by $(CoreCLRConfiguration) in ILCompiler.ReadyToRun.Tests#129548jtschuster wants to merge 1 commit into
jtschuster wants to merge 1 commit into
Conversation
The ILCompiler.ReadyToRun.Tests project resolved crossgen2 and the copied wasm JIT via $(RuntimeBinDir), which is keyed on the test project's own $(Configuration), while the sibling CoreCLR artifacts it sits next to (System.Private.CoreLib, the JITs) are keyed on $(CoreCLRConfiguration) via $(CoreCLRArtifactsPath). These agree in CI (where clr-category projects force Configuration=CoreCLRConfiguration) but diverge in dev builds such as 'clr -rc release' followed by running the test at the default Debug config: crossgen2 then publishes to / is looked up under the Debug tree while the rest of the CoreCLR artifacts are under Release, so the test cannot find a working crossgen2. Align all three spots that determine the crossgen2 location on $(CoreCLRConfiguration): - The crossgen2_inbuild ProjectReference now sets Configuration to $(CoreCLRConfiguration) (guarded so it is a no-op when the configs already match), mirroring the CoreLib SetConfiguration pattern in eng/references.targets, so crossgen2 publishes under the CoreCLR config. - The wasm JIT copy destination and the R2RTest.Crossgen2Dir runtime option now use $(CoreCLRArtifactsPath) instead of $(RuntimeBinDir). In CI this is a no-op (Configuration == CoreCLRConfiguration). For dev builds it lets the test find crossgen2 without forcing the test project to be built in the same configuration as CoreCLR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns ILCompiler.ReadyToRun.Tests’s crossgen2 (and wasm JIT copy) location/configuration with CoreCLR build artifacts by keying them off $(CoreCLRConfiguration) / $(CoreCLRArtifactsPath) instead of the test project’s $(Configuration) / $(RuntimeBinDir). This helps developer workflows where CoreCLR is built in one configuration (e.g., Release) while tests are built/run in another (e.g., Debug).
Changes:
- Sets the
crossgen2_inbuildProjectReferenceto build/publish using$(CoreCLRConfiguration)viaSetConfiguration. - Updates the wasm JIT copy destination to use
$(CoreCLRArtifactsPath)instead of$(RuntimeBinDir). - Updates
R2RTest.Crossgen2Dirto point at the CoreCLR artifacts location.
Comment on lines
83
to
85
| <RuntimeHostConfigurationOption Include="R2RTest.Crossgen2Dir"> | ||
| <Value>$(RuntimeBinDir)/$(BuildArchitecture)/crossgen2</Value> | ||
| <Value>$(CoreCLRArtifactsPath)/$(BuildArchitecture)/crossgen2</Value> | ||
| </RuntimeHostConfigurationOption> |
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ILCompiler.ReadyToRun.Tests project resolved crossgen2 and the copied JIT via
$(RuntimeBinDir), which is keyed on the test project's own$(Configuration), while the sibling CoreCLR artifacts it sits next to (System.Private.CoreLib, the JITs) are keyed on$(CoreCLRConfiguration)via$(CoreCLRArtifactsPath). These agree in CI (Configuration=CoreCLRConfiguration) but diverge in dev builds whereclris built inRelease, and test is run in the default Debug config.Align all the crossgen2 config/location on $(CoreCLRConfiguration):
$(CoreCLRConfiguration), so crossgen2 publishes under the CoreCLR config.$(CoreCLRArtifactsPath)instead of$(RuntimeBinDir).In CI this is a no-op (Configuration == CoreCLRConfiguration). For dev builds it lets the test find crossgen2 without forcing the test project to be built in the same configuration as CoreCLR.