diff --git a/eng/Subsets.props b/eng/Subsets.props
index ba8bc03906a1cb..1431cd92a378d9 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -372,7 +372,7 @@
The cross tools are used as part of the build process with the downloaded build tools, so we need to build them for the host architecture and build them as unsanitized binaries.
-->
- <_BuildAnyCrossArch Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != '') and '$(TargetArchitecture)' != 'wasm'">true
+ <_BuildAnyCrossArch Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != '')">true
<_BuildCrossComponents Condition="$(_subset.Contains('+clr.crossarchtools+'))">true
<_BuildCrossComponents Condition="'$(ClrRuntimeBuildSubsets)' != '' and ('$(PrimaryRuntimeFlavor)' == 'CoreCLR' or '$(TargetsMobile)' == 'true')">true
<_CrossBitwidthBuild Condition="'$(BuildArchitecture)' == 'x64' and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'arm')">true
@@ -381,7 +381,9 @@
- <_CrossToolSubset Condition="'$(_BuildCrossComponents)' == 'true' and ($(_subset.Contains('+clr.tools+')) or $(_subset.Contains('+clr.nativecorelib+')) or $(_subset.Contains('+clr.crossarchtools+')))" Include="ClrAllJitsSubset=true" />
+ <_CrossToolSubset Condition="'$(_BuildCrossComponents)' == 'true' and '$(TargetArchitecture)' != 'wasm' and ($(_subset.Contains('+clr.tools+')) or $(_subset.Contains('+clr.nativecorelib+')) or $(_subset.Contains('+clr.crossarchtools+')))" Include="ClrAllJitsSubset=true" />
+
+ <_CrossToolSubset Condition="'$(_BuildCrossComponents)' == 'true' and '$(TargetArchitecture)' == 'wasm' and ($(_subset.Contains('+clr.tools+')) or $(_subset.Contains('+clr.nativecorelib+')) or $(_subset.Contains('+clr.crossarchtools+')))" Include="ClrWasmJitSubset=true" />
<_CrossToolSubset Condition="'$(_BuildCrossComponents)' == 'true' and '$(TargetsWindows)' == 'true'" Include="ClrDebugSubset=true" />
false
-
- false
+ false
CopyILCoreLib
@@ -42,6 +41,11 @@
$(CrossgenTargetName);LinkCoreLibMachO
+
+ wasm
+ CopyILCoreLib;$(CrossgenTargetName)
+
+
$(CrossgenTargetName);CopyR2RComponentCoreLib
@@ -68,6 +72,10 @@
$([MSBuild]::NormalizePath('$(BinDir)', '$(CoreLibAssemblyName).dylib'))
+
+ $([MSBuild]::NormalizePath('$(BinDir)', '$(CoreLibAssemblyName).NotReadyYet.wasm'))
+
+
$([MSBuild]::NormalizePath('$(IntermediateOutputPath)', '$(CoreLibAssemblyName).dll'))
@@ -149,6 +157,7 @@
$(CrossGenDllCmd) -r:$([MSBuild]::NormalizePath('$(BinDir)', 'IL', '*.dll'))
$(CrossGenDllCmd) --targetarch:$(TargetArchitecture)
$(CrossGenDllCmd) --obj-format:$(PublishReadyToRunContainerFormat)
+ $(CrossGenDllCmd) --codegenopt:JitWasmNyiToR2RUnsupported=1
$(CrossGenDllCmd) --composite
$(CrossGenDllCmd) --targetos:$(TargetOS)
diff --git a/src/coreclr/gcinfo/CMakeLists.txt b/src/coreclr/gcinfo/CMakeLists.txt
index 05521608a09a73..9757b755f27173 100644
--- a/src/coreclr/gcinfo/CMakeLists.txt
+++ b/src/coreclr/gcinfo/CMakeLists.txt
@@ -93,5 +93,6 @@ endif (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_UNIX)
if (CLR_CMAKE_TARGET_ARCH_WASM)
create_gcinfo_lib(TARGET gcinfo_unix_wasm OS browser ARCH wasm)
+ create_gcinfo_lib(TARGET gcinfo_universal_wasm OS universal ARCH wasm)
install_clr(TARGETS gcinfo_unix_wasm DESTINATIONS sharedFramework COMPONENT runtime)
endif (CLR_CMAKE_TARGET_ARCH_WASM)
diff --git a/src/coreclr/jit/CMakeLists.txt b/src/coreclr/jit/CMakeLists.txt
index dd83c6891518fe..3dadf640040780 100644
--- a/src/coreclr/jit/CMakeLists.txt
+++ b/src/coreclr/jit/CMakeLists.txt
@@ -719,6 +719,10 @@ if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
endif(CLR_CMAKE_BUILD_COMMUNITY_ALTJITS EQUAL 1)
endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
+if (CLR_CMAKE_TARGET_ARCH_WASM)
+ create_standalone_jit(TARGET clrjit_universal_wasm_${ARCH_HOST_NAME} OS universal ARCH wasm)
+endif (CLR_CMAKE_TARGET_ARCH_WASM)
+
if (CLR_CMAKE_TARGET_ARCH_LOONGARCH64)
create_standalone_jit(TARGET clrjit_unix_loongarch64_${ARCH_HOST_NAME} OS unix ARCH loongarch64)
endif (CLR_CMAKE_TARGET_ARCH_LOONGARCH64)
diff --git a/src/coreclr/jit/codegenwasm.cpp b/src/coreclr/jit/codegenwasm.cpp
index 0d89746cf97da6..cadcd3ce857632 100644
--- a/src/coreclr/jit/codegenwasm.cpp
+++ b/src/coreclr/jit/codegenwasm.cpp
@@ -3321,10 +3321,12 @@ void CodeGen::genEmitGSCookieCheck(bool tailCall)
NYI_WASM("genEmitGSCookieCheck");
}
+#ifdef PROFILING_SUPPORTED
void CodeGen::genProfilingLeaveCallback(unsigned helper)
{
NYI_WASM("genProfilingLeaveCallback");
}
+#endif
void CodeGen::genSpillVar(GenTree* tree)
{
diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp
index 24b980ccc8f755..b01372eead07a5 100644
--- a/src/coreclr/jit/compiler.cpp
+++ b/src/coreclr/jit/compiler.cpp
@@ -3113,10 +3113,12 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
printf("OPTIONS: compProcedureSplittingEH = %s\n", dspBool(opts.compProcedureSplittingEH));
// This is rare; don't clutter up the dump with it normally.
+#ifdef PROFILING_SUPPORTED
if (compProfilerHookNeeded)
{
printf("OPTIONS: compProfilerHookNeeded = %s\n", dspBool(compProfilerHookNeeded));
}
+#endif
if (jitFlags->IsSet(JitFlags::JIT_FLAG_BBOPT))
{
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.props b/src/coreclr/tools/aot/crossgen2/crossgen2.props
index 2589fde1ea9da4..825f499e688d04 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.props
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.props
@@ -55,7 +55,7 @@
CopyToPublishDirectory="PreserveNewest"
ExcludeFromSingleFile="$(PublishSingleFile)"
Link="%(FileName)%(Extension)"
- Condition="'$(TargetsWasm)' != 'true'"
+ Condition="'$(TargetsWasm)' != 'true' or '$(CrossHostArch)' != ''"
/>