Repository navigation
Align NativeAOT WASM runtime artifact names - #136999
MichalStrehovsky wants to merge 4 commits into
Conversation
Rename the portable runtime library to Runtime.WorkstationGC and generate AsmOffsets.cs. Update the WASM linker and CoreLib consumers without changing runtime sources or defines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b3e871f9-f4ec-4d90-91ad-fd5697b4b31b
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
I think it would make sense. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 67e21777-f3d8-4031-a350-84b9e2001764
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
🔵 Needs a closer look
The NativeAOT-wide CMake scoping changes require cross-platform build, link, and toolchain validation that was unavailable in this static review.
No open issues 🎉
What changed in this PR
This PR aligns NativeAOT WASM artifact names with other targets and consolidates runtime build configuration into a single CMake file.
Changes:
- Rename the WASM runtime archive to
Runtime.WorkstationGCand update its linker reference. - Generate
Runtime/AsmOffsets.csat a shared location and update both CoreLib consumers. - Remove the separate Full and Portable CMake files, moving their target definitions into
Runtime/CMakeLists.txt.
| File | Description |
|---|---|
src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj |
Use the shared Runtime/AsmOffsets.cs path. |
src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj |
Unify WASM and non-WASM assembly-offset inputs. |
src/coreclr/nativeaot/Runtime/Portable/CMakeLists.txt |
Remove the separate portable runtime build configuration. |
src/coreclr/nativeaot/Runtime/Full/CMakeLists.txt |
Remove the separate full runtime build configuration. |
src/coreclr/nativeaot/Runtime/CMakeLists.txt |
Consolidate runtime targets, helper selection, and offset generation. |
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Wasm.targets |
Link WASM applications against libRuntime.WorkstationGC.a. |
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 404e37e0-40b9-42e0-a486-b369c16cc301
jkotas
left a comment
There was a problem hiding this comment.
Move install_static_library to be next to what it is installing, so that the optional and non-optional targets have the same flow
| endif() | ||
| if(FEATURE_EVENT_TRACE AND CLR_CMAKE_TARGET_WIN32) | ||
| add_dependencies(standalonegc-disabled aot_etw_headers) | ||
| endif() |
There was a problem hiding this comment.
| endif() | |
| endif() | |
| install_static_library(standalonegc-disabled aotsdk nativeaot) |
| endif() | ||
| if(NOT FEATURE_PORTABLE_HELPERS) | ||
| target_link_libraries(Runtime.WorkstationGC PRIVATE Runtime.AsmHelpers) | ||
| endif() |
There was a problem hiding this comment.
| endif() | |
| endif() | |
| install_static_library(Runtime.WorkstationGC aotsdk nativeaot) |
| if(CLR_CMAKE_TARGET_WIN32) | ||
| set_target_properties(aotminipal PROPERTIES | ||
| COMPILE_PDB_NAME "aotminipal" | ||
| COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>") | ||
| endif() | ||
|
|
||
| add_custom_command( | ||
| # AsmOffsets.cs is consumed later by the managed build. | ||
| TARGET Runtime.WorkstationGC | ||
| POST_BUILD | ||
| COMMAND ${CMAKE_CXX_COMPILER} ${COMPILER_LANGUAGE} ${DEFINITIONS} ${PREPROCESSOR_FLAGS} | ||
| -I"${ARCH_SOURCES_DIR}" "${ASM_OFFSETS_CSPP}" >"${CMAKE_CURRENT_BINARY_DIR}/AsmOffsets.cs" | ||
| ) | ||
|
|
||
| install_static_library(Runtime.WorkstationGC aotsdk nativeaot) | ||
| install_static_library(standalonegc-disabled aotsdk nativeaot) | ||
| install_static_library(aotminipal aotsdk nativeaot) |
There was a problem hiding this comment.
| if(CLR_CMAKE_TARGET_WIN32) | |
| set_target_properties(aotminipal PROPERTIES | |
| COMPILE_PDB_NAME "aotminipal" | |
| COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>") | |
| endif() | |
| add_custom_command( | |
| # AsmOffsets.cs is consumed later by the managed build. | |
| TARGET Runtime.WorkstationGC | |
| POST_BUILD | |
| COMMAND ${CMAKE_CXX_COMPILER} ${COMPILER_LANGUAGE} ${DEFINITIONS} ${PREPROCESSOR_FLAGS} | |
| -I"${ARCH_SOURCES_DIR}" "${ASM_OFFSETS_CSPP}" >"${CMAKE_CURRENT_BINARY_DIR}/AsmOffsets.cs" | |
| ) | |
| install_static_library(Runtime.WorkstationGC aotsdk nativeaot) | |
| install_static_library(standalonegc-disabled aotsdk nativeaot) | |
| install_static_library(aotminipal aotsdk nativeaot) | |
| if(CLR_CMAKE_TARGET_WIN32) | |
| set_target_properties(aotminipal PROPERTIES | |
| COMPILE_PDB_NAME "aotminipal" | |
| COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>") | |
| endif() | |
| install_static_library(aotminipal aotsdk nativeaot) | |
| add_custom_command( | |
| # AsmOffsets.cs is consumed later by the managed build. | |
| TARGET Runtime.WorkstationGC | |
| POST_BUILD | |
| COMMAND ${CMAKE_CXX_COMPILER} ${COMPILER_LANGUAGE} ${DEFINITIONS} ${PREPROCESSOR_FLAGS} | |
| -I"${ARCH_SOURCES_DIR}" "${ASM_OFFSETS_CSPP}" >"${CMAKE_CURRENT_BINARY_DIR}/AsmOffsets.cs" | |
| ) |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25b5a402-5d11-4d2d-a2b9-5d62a73b3e4d
Rename the portable runtime library to Runtime.WorkstationGC and generate AsmOffsets.cs. Update the WASM linker and CoreLib consumers without changing runtime sources or defines.
I originally started with just deleting Runtime/Portable/CMakeLists.txt, but then realized the Runtime/CMakeLists.txt and Runtime/Full/CMakeLists.txt split then stops making sense, so we'd also need to delete Full/CMakeLists.txt, but then the structuring in Runtime/CMakeLists.txt would also become nonsensical and we'd need to restructure it and lose any remnants of the portable runtime flavor.
This should address dotnet/dotnet#10703 (comment).