Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,18 @@
"
IsNative="true" />

<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(IsTestsCommonProject)' != 'true'"
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(IsTestsCommonProject)' != 'true' and '$(EnableDiagnostics)' != 'true' and '$(EventSourceSupport)' != 'true'"
Include="
$(LibrariesSharedFrameworkDir)dotnet.native.js;
$(LibrariesSharedFrameworkDir)dotnet.native.js.symbols;
$(LibrariesSharedFrameworkDir)dotnet.native.wasm;"
IsNative="true" />
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(IsTestsCommonProject)' != 'true' and ('$(EnableDiagnostics)' == 'true' or '$(EventSourceSupport)' == 'true')"
Include="
$(LibrariesSharedFrameworkDir)native-flavors\diagnostics\dotnet.native.js;
$(LibrariesSharedFrameworkDir)native-flavors\diagnostics\dotnet.native.js.symbols;
$(LibrariesSharedFrameworkDir)native-flavors\diagnostics\dotnet.native.wasm;"
IsNative="true" />
<!-- Headers included by the CoreCLR native relink generated sources (see BrowserWasmApp.CoreCLR.targets).
The browserhost CMakeLists installs them into the host sharedFramework; mirrors the Mono include\wasm handling. -->
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'browser' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(IsTestsCommonProject)' != 'true'"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Regenerates the checked-in CoreCLR WebAssembly call helpers for this leg's target OS
# (src/coreclr/vm/wasm/<os>/callhelpers-*.cpp) from the testhost and crossgen2 the leg just built,
# (src/coreclr/vm/wasm/<os>/callhelpers-*.cpp and browser flavor subdirectories) from the managed
# closures and crossgen2 the leg just built,
# and fails if they differ from what is committed. A stale table builds fine but crashes the
# corerun that links it, for example with "GetUnmanagedCallersOnlyThunk: unknown thunk" when a
# new [UnmanagedCallersOnly] method is missing. See src/coreclr/vm/wasm/generate-coreclr-helpers.md.
Expand Down Expand Up @@ -44,7 +45,7 @@ steps:
echo "The managed code that feeds these tables ([UnmanagedCallersOnly] methods, P/Invokes, QCalls)"
echo "changed without the tables being regenerated. To fix, run from the repository root:"
echo
echo " ./build.sh clr+libs -os $target_os -c $configuration"
echo " ./build.sh clr+libs+host -os $target_os -c $configuration"
echo " src/coreclr/vm/wasm/generate-coreclr-helpers.sh -c $configuration --target-os $target_os"
echo
echo "and commit the changes under $table_dir."
Expand Down
2 changes: 2 additions & 0 deletions eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">false</UseSystemResourceKeys>
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">true</EventSourceSupport>
<EnableDiagnostics Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(EnableDiagnostics)' == ''">$(EventSourceSupport)</EnableDiagnostics>
<_WasmCoreClrEventSourceSupportSpecified Condition="'$(RuntimeFlavor)' == 'CoreCLR'">true</_WasmCoreClrEventSourceSupportSpecified>
<_WasmCoreClrEnableDiagnosticsSpecified Condition="'$(RuntimeFlavor)' == 'CoreCLR'">true</_WasmCoreClrEnableDiagnosticsSpecified>
<NullabilityInfoContextSupport Condition="'$(NullabilityInfoContextSupport)' == ''">true</NullabilityInfoContextSupport>

<!-- Library tests run directly from bin/ without the static web assets middleware,
Expand Down
24 changes: 24 additions & 0 deletions src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ if (TARGET cee_wks_gen)
$<TARGET_OBJECTS:cee_wks_gen>
)
endif()
if (TARGET cee_wks_gen_production)
add_library_clr(coreclr_gen_production_static
STATIC
$<TARGET_OBJECTS:cee_wks_gen_production>
)
endif()
if (TARGET cee_wks_gen_diagnostics)
add_library_clr(coreclr_gen_diagnostics_static
STATIC
$<TARGET_OBJECTS:cee_wks_gen_diagnostics>
)
endif()

if (CLR_CMAKE_HOST_ANDROID)
target_link_libraries(coreclr PUBLIC log)
Expand Down Expand Up @@ -281,13 +293,25 @@ else()
if (TARGET coreclr_gen_static)
install_clr(TARGETS coreclr_gen_static DESTINATIONS . sharedFramework COMPONENT runtime)
endif()
if (TARGET coreclr_gen_production_static)
install_clr(TARGETS coreclr_gen_production_static DESTINATIONS . sharedFramework COMPONENT runtime)
endif()
if (TARGET coreclr_gen_diagnostics_static)
install_clr(TARGETS coreclr_gen_diagnostics_static DESTINATIONS . sharedFramework COMPONENT runtime)
endif()
endif(NOT CLR_CMAKE_HOST_ARCH_WASM)

if(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS OR CLR_CMAKE_HOST_ANDROID OR CLR_CMAKE_HOST_ARCH_WASM)
install_clr(TARGETS coreclr_static DESTINATIONS . COMPONENT runtime)
if (TARGET coreclr_gen_static)
install_clr(TARGETS coreclr_gen_static DESTINATIONS . COMPONENT runtime)
endif()
if (TARGET coreclr_gen_production_static)
install_clr(TARGETS coreclr_gen_production_static DESTINATIONS . COMPONENT runtime)
endif()
if (TARGET coreclr_gen_diagnostics_static)
install_clr(TARGETS coreclr_gen_diagnostics_static DESTINATIONS . COMPONENT runtime)
endif()
endif(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS OR CLR_CMAKE_HOST_ANDROID OR CLR_CMAKE_HOST_ARCH_WASM)

# Enable profile guided optimization
Expand Down
20 changes: 20 additions & 0 deletions src/coreclr/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -991,11 +991,29 @@ elseif(CLR_CMAKE_TARGET_ARCH_WASM)
${ARCH_SOURCES_DIR}/${WASM_THUNK_SUBDIR}/callhelpers-interp-to-managed.cpp
${ARCH_SOURCES_DIR}/${WASM_THUNK_SUBDIR}/callhelpers-reverse.cpp
)
if(CLR_CMAKE_TARGET_BROWSER)
set(VM_SOURCES_WKS_GEN_PRODUCTION
${ARCH_SOURCES_DIR}/browser/production/callhelpers-interp-to-managed.cpp
${ARCH_SOURCES_DIR}/browser/production/callhelpers-reverse.cpp
)
set(VM_SOURCES_WKS_GEN_DIAGNOSTICS
${ARCH_SOURCES_DIR}/browser/diagnostics/callhelpers-interp-to-managed.cpp
${ARCH_SOURCES_DIR}/browser/diagnostics/callhelpers-reverse.cpp
)
endif()
if (GEN_PINVOKE)
add_compile_definitions(GEN_PINVOKE=1)
list(APPEND VM_SOURCES_WKS_GEN
${ARCH_SOURCES_DIR}/${WASM_THUNK_SUBDIR}/callhelpers-pinvoke.cpp
)
if(CLR_CMAKE_TARGET_BROWSER)
list(APPEND VM_SOURCES_WKS_GEN_PRODUCTION
${ARCH_SOURCES_DIR}/browser/production/callhelpers-pinvoke.cpp
)
list(APPEND VM_SOURCES_WKS_GEN_DIAGNOSTICS
${ARCH_SOURCES_DIR}/browser/diagnostics/callhelpers-pinvoke.cpp
)
endif()
endif(GEN_PINVOKE)
endif()

Expand Down Expand Up @@ -1075,6 +1093,8 @@ endif()

convert_to_absolute_path(VM_SOURCES_WKS ${VM_SOURCES_WKS})
convert_to_absolute_path(VM_SOURCES_WKS_GEN ${VM_SOURCES_WKS_GEN})
convert_to_absolute_path(VM_SOURCES_WKS_GEN_PRODUCTION ${VM_SOURCES_WKS_GEN_PRODUCTION})
convert_to_absolute_path(VM_SOURCES_WKS_GEN_DIAGNOSTICS ${VM_SOURCES_WKS_GEN_DIAGNOSTICS})
convert_to_absolute_path(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARCH_ASM})
convert_to_absolute_path(VM_SOURCES_DAC ${VM_SOURCES_DAC})
convert_to_absolute_path(VM_SOURCES_WKS_SPECIAL ${VM_SOURCES_WKS_SPECIAL})
Expand Down
Loading
Loading