Skip to content

Always enable static linking when dynamic code compiled feature is false#124403

Merged
BrzVlad merged 3 commits intodotnet:mainfrom
BrzVlad:fix-dynamiccodecompiled-packs
Feb 16, 2026
Merged

Always enable static linking when dynamic code compiled feature is false#124403
BrzVlad merged 3 commits intodotnet:mainfrom
BrzVlad:fix-dynamiccodecompiled-packs

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Feb 13, 2026

If dynamic code compiled feature is false then we produce the interpreter library, which currently doesn't have a PlatformManifestEntry. Rather than including this in the manifest entries, simply link the interpreter library into the runtime.

If dynamiccodecompiled is false then we enable the interpreter library. The packs build fails because we don't have manifest entries for the interpreter library. This commit adds these entries but only for desktop when dynamiccodecompiled is false, so that the manifest of the official builds is not changed.
Copilot AI review requested due to automatic review settings February 13, 2026 21:22
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

@BrzVlad
Copy link
Member Author

BrzVlad commented Feb 13, 2026

@jkotas Hitting a failure for the packs build, I remembered there was this other reason for enabling static linking when dynamic code compiled feature is false. I've included another commit (which was then reverted) on the PR, that adds conditionals on the platform manifest entries (the target os checks might actually not be needed since I suspect we don't publish to nuget from those builds). Anyhow, I'm not enthusiastic about this debug feature option creeping its way into those packaging msbuild targets and ensuring their correctness. Therefore I went back to the simple solution of just enabling static linking. Let me know which approach you think works best.

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 pull request modifies the CoreCLR feature configuration to enable static linking when dynamic code compilation is disabled. The change ensures that the interpreter library is statically linked into the runtime on desktop platforms when FEATURE_DYNAMIC_CODE_COMPILED is false, avoiding the need for platform manifest entries in pack builds.

Changes:

  • Extended the FEATURE_STATICALLY_LINKED condition to include scenarios where FEATURE_DYNAMIC_CODE_COMPILED is false, in addition to the existing mobile platform checks (WASM, iOS, tvOS, macCatalyst)

@BrzVlad BrzVlad merged commit 31c3ed9 into dotnet:main Feb 16, 2026
111 of 113 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants