Add logic to muxer to invoke AOT-ed SDK#126596
Open
elinor-fung wants to merge 2 commits intodotnet:mainfrom
Open
Add logic to muxer to invoke AOT-ed SDK#126596elinor-fung wants to merge 2 commits intodotnet:mainfrom
elinor-fung wants to merge 2 commits intodotnet:mainfrom
Conversation
When the dotnet muxer resolves an SDK, it now checks for a dotnet-aot native library in the SDK directory before falling back to the managed dotnet.dll path. If the library exists and exports a dotnet_execute entry point, the muxer loads it and calls it with the host path, dotnet root, SDK directory, hostfxr path, and user arguments. The AOT library handles its own fallback to the managed runtime path when needed. If the library cannot be loaded or the entry point is missing, the muxer gracefully falls back to the existing managed SDK path. Fixes dotnet#126171 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add DispatchToAotSdk test to verify the muxer correctly loads and invokes the dotnet-aot library from the resolved SDK directory. The test uses a mock AOT SDK shared library that prints the received arguments for validation. - Add mockaotsdk native test library with dotnet_execute entry point - Add DotNetAot entry to Binaries.cs for test discovery - Add DispatchToAotSdk test in SDKLookup.cs - Move 'Using AOT-ed SDK' trace to just before invocation and remove redundant failure trace on load_library Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @agocke, @jeffschwMSFT, @elinor-fung |
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.
Fixes #126171
Updates the muxer to look for and natively invoke a \dotnet-aot\ shared library when it exists in the resolved SDK directory. When present, the muxer loads the library, resolves the \dotnet_execute\ entry point, and calls it with the host path, dotnet root, SDK directory, hostfxr path, and user arguments. If the AOT library is not available or doesn't have the expected entry point, the muxer falls back to the existing managed SDK path.
Changes
Native host
try_invoke_aot_sdkhelper infx_muxer_t::handle_clithat attempts to loaddotnet-aotfrom the resolved SDK directorydotnet.dllpath if the AOT library is absentTests
mockaotsdknative test library that implements thedotnet_executeentry point and prints received argumentsDispatchToAotSdktest inSDKLookup.csvalidating the muxer dispatches to the AOT SDK with the correct arguments