Skip to content

Commit a80fd11

Browse files
Build NativeAOT cDAC data descriptors for wasm (#138315)
Include the NativeAOT runtime and GC contract descriptors in the wasm runtime library. Under emscripten, the shared descriptor infrastructure exports GetDotNetRuntimeContractDescriptor, which the browser JS glue uses to expose the descriptor to cDAC. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 72879d41-e2bb-436e-9735-42f51bca02e8
1 parent 7b1c31a commit a80fd11

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

‎src/coreclr/nativeaot/Runtime/CMakeLists.txt‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -415,15 +415,13 @@ if(FEATURE_PERFTRACING)
415415
add_subdirectory(eventpipe)
416416
endif()
417417

418-
if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
419-
# Create an interface library that captures the Runtime's include directories
420-
# for use by the datadescriptor intermediary compilation.
421-
add_library(nativeaot_runtime_includes INTERFACE)
422-
get_property(_runtime_includes DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
423-
target_include_directories(nativeaot_runtime_includes INTERFACE ${_runtime_includes})
418+
# Create an interface library that captures the Runtime's include directories
419+
# for use by the datadescriptor intermediary compilation.
420+
add_library(nativeaot_runtime_includes INTERFACE)
421+
get_property(_runtime_includes DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
422+
target_include_directories(nativeaot_runtime_includes INTERFACE ${_runtime_includes})
424423

425-
add_subdirectory(datadescriptor)
426-
endif()
424+
add_subdirectory(datadescriptor)
427425

428426
if(FEATURE_PORTABLE_HELPERS)
429427
add_definitions(-DFEATURE_PORTABLE_HELPERS)
@@ -535,9 +533,7 @@ if(FEATURE_PERFTRACING)
535533
add_dependencies(Runtime.WorkstationGC aot_eventing_headers)
536534
endif()
537535
target_link_libraries(Runtime.WorkstationGC PRIVATE aotminipal)
538-
if(NOT CLR_CMAKE_TARGET_ARCH_WASM)
539-
target_link_libraries(Runtime.WorkstationGC PRIVATE nativeaot_cdac_contract_descriptor nativeaot_gc_wks_descriptor)
540-
endif()
536+
target_link_libraries(Runtime.WorkstationGC PRIVATE nativeaot_cdac_contract_descriptor nativeaot_gc_wks_descriptor)
541537
if(NOT FEATURE_PORTABLE_HELPERS)
542538
target_link_libraries(Runtime.WorkstationGC PRIVATE Runtime.AsmHelpers)
543539
endif()

0 commit comments

Comments
 (0)