Skip to content

Conversation

@kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Sep 4, 2025

Description

This PR ensures that tiered compilation–related logic is compiled only when FEATURE_TIERED_COMPILATION is enabled. Several components like DAC variables, vtable pointer lists, assembly constants, thunk templates, and event tracing unconditionally referenced these stubs. On builds without tiered compilation, this resulted in runtime build errors.

This change fixes CoreCLR builds for Apple mobile.

Copilot AI review requested due to automatic review settings September 4, 2025 16:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes runtime build errors that occur when tiered compilation is disabled by properly wrapping tiered compilation-related code with FEATURE_TIERED_COMPILATION guards. The changes ensure that code referencing tiered compilation stubs and data structures is only compiled when the feature is enabled.

Key Changes

  • Added conditional compilation guards around call counting stub definitions and references
  • Fixed incorrect feature flags for on-stack replacement code sections
  • Protected tiered compilation ETW event tracing code

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/coreclr/vm/riscv64/asmhelpers.S Fixed feature guards for patchpoint stubs
src/coreclr/vm/riscv64/asmconstants.h Added guards around call counting stub constants
src/coreclr/vm/loongarch64/thunktemplates.S Protected call counting stub template
src/coreclr/vm/loongarch64/asmhelpers.S Fixed feature guards for patchpoint stubs
src/coreclr/vm/loongarch64/asmconstants.h Added guards around call counting stub constants
src/coreclr/vm/i386/thunktemplates.S Protected call counting stub template
src/coreclr/vm/i386/asmconstants.h Added guards around call counting stub constants
src/coreclr/vm/eventtrace.cpp Protected tiered compilation ETW events
src/coreclr/vm/arm64/thunktemplates.S Protected call counting stub templates
src/coreclr/vm/arm64/asmhelpers.S Fixed feature guards for patchpoint stubs
src/coreclr/vm/arm64/asmconstants.h Added guards around call counting stub constants
src/coreclr/vm/arm/asmconstants.h Added guards around call counting stub constants
src/coreclr/vm/amd64/thunktemplates.S Protected call counting stub template
src/coreclr/vm/amd64/asmconstants.h Added guards around call counting stub constants
src/coreclr/inc/vptr_list.h Protected call counting stub manager declaration
src/coreclr/inc/dacvars.h Protected call counting stub manager DAC variable
src/coreclr/debug/daccess/dacdbiimpl.cpp Fixed assignment to boolean pointer

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

This comment was marked as outdated.

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos kotlarmilos marked this pull request as draft September 6, 2025 05:56
@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos kotlarmilos marked this pull request as ready for review September 22, 2025 13:38
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

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

LGTM. I'd like to see #119355 (comment) applied before merge.

@kotlarmilos kotlarmilos enabled auto-merge (squash) September 23, 2025 09:31
@kotlarmilos kotlarmilos merged commit a2d130a into dotnet:main Sep 23, 2025
98 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants