diff --git a/eng/codeOptimization.targets b/eng/codeOptimization.targets
index 5f990a983476d7..68a8d887d394ad 100644
--- a/eng/codeOptimization.targets
+++ b/eng/codeOptimization.targets
@@ -31,6 +31,9 @@
true
+
+
diff --git a/eng/testing/tests.browser.targets b/eng/testing/tests.browser.targets
index 5b9cebd29185b1..ea5afc888b17a7 100644
--- a/eng/testing/tests.browser.targets
+++ b/eng/testing/tests.browser.targets
@@ -10,9 +10,13 @@
false
false
true
+
false
- true
+
+ false
+ true
<_WasmInTreeDefaults>false
+ false
$(ResolveWasmOutputsDependsOn);
diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets
index c1fe8193bea892..92ca4f036c62bb 100644
--- a/eng/testing/tests.mobile.targets
+++ b/eng/testing/tests.mobile.targets
@@ -119,8 +119,12 @@
<_ResolvedStreamConformanceTests
Include="@(ResolvedFileToPublish)"
Condition="'%(ResolvedFileToPublish.FileName)' == 'StreamConformanceTests'" />
+ <_ResolvedTestUtilities
+ Include="@(ResolvedFileToPublish)"
+ Condition="'%(ResolvedFileToPublish.FileName)' == 'TestUtilities'" />
-
+
+
diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets
index 37498d8f9da0b2..1bc0a5d7ff4630 100644
--- a/eng/testing/tests.wasm.targets
+++ b/eng/testing/tests.wasm.targets
@@ -56,6 +56,20 @@
$(NoWarn);IL2121
+
+
+
+
+
+
+
+ <_ResolvedTestUtilities Include="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.FileName)' == 'TestUtilities'" />
+
+
+
+
helix
helix
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj
index f8338254bfdda4..d5a40b9c28f982 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj
@@ -20,9 +20,6 @@
Suppress the NU1511 warning in the whole project as putting it on a P2P doesn't work: https://github.com/NuGet/Home/issues/14121 -->
$(NoWarn);NU1511
false
-
-
- true
diff --git a/src/libraries/System.Runtime.Loader/tests/ILLink.Descriptors.AppleMobile.xml b/src/libraries/System.Runtime.Loader/tests/ILLink.Descriptors.AppleMobile.xml
new file mode 100644
index 00000000000000..003195a897ce30
--- /dev/null
+++ b/src/libraries/System.Runtime.Loader/tests/ILLink.Descriptors.AppleMobile.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/libraries/System.Runtime.Loader/tests/ILLink.Descriptors.xml b/src/libraries/System.Runtime.Loader/tests/ILLink.Descriptors.xml
index 991945c09a3ad2..7fa0c9a0982542 100644
--- a/src/libraries/System.Runtime.Loader/tests/ILLink.Descriptors.xml
+++ b/src/libraries/System.Runtime.Loader/tests/ILLink.Descriptors.xml
@@ -2,6 +2,4 @@
-
-
diff --git a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj b/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj
index 9909ec4f738030..9aa865115a15c9 100644
--- a/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj
+++ b/src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj
@@ -102,6 +102,8 @@
+
+
diff --git a/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets b/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
index 98360e93f59bb4..4c2944bb0615fd 100644
--- a/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
+++ b/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
@@ -204,7 +204,11 @@
NativeLibrary items are converted to NativeFileReference items later in the
flow (in _CoreCLRPrepareForNativeBuild) so we have to inspect both here. -->
true
+
false
- true
+ true
diff --git a/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs b/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs
index cb5375c5883cfe..3e0a2b63b8c485 100644
--- a/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs
+++ b/src/mono/wasm/Wasm.Build.Tests/CoreCLRWasmNativeDefaultsTests.cs
@@ -53,8 +53,10 @@ public CoreCLRWasmNativeDefaultsTests(ITestOutputHelper output, SharedBuildPerTe
// comparison is textual, so a numerically equal but differently spelled size counts as
// a mismatch. That only costs an unnecessary relink, never a mismatched binary.
{ "2097152", true },
- // a non-registry trigger: setting WasmPerformanceInstrumentation always forces a relink
- { "all", true },
+ // WasmPerformanceInstrumentation would force a relink, but that defaulting is temporarily
+ // disabled in BrowserWasmApp.CoreCLR.targets pending https://github.com/dotnet/runtime/issues/132772,
+ // so it currently does not relink.
+ { "all", false },
};
[Theory]
diff --git a/src/mono/wasm/build/WasmApp.Common.targets b/src/mono/wasm/build/WasmApp.Common.targets
index 5835ac039256f3..d592ec19a2a55e 100644
--- a/src/mono/wasm/build/WasmApp.Common.targets
+++ b/src/mono/wasm/build/WasmApp.Common.targets
@@ -523,8 +523,8 @@
false
-
- true
+
+ true
diff --git a/src/native/corehost/corehost.proj b/src/native/corehost/corehost.proj
index 05a479acd8884b..6c0160c61aa655 100644
--- a/src/native/corehost/corehost.proj
+++ b/src/native/corehost/corehost.proj
@@ -198,6 +198,11 @@
<_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(LibrariesSharedFrameworkDir)*.js" />
<_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(LibrariesSharedFrameworkDir)*.a" />
<_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(LibrariesSharedFrameworkDir)*.dat" />
+ <_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(CoreCLRSharedFrameworkDir)libcoreclr_static.a" />
+ <_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(CoreCLRSharedFrameworkDir)libcoreclrminipal.a" />
+ <_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(CoreCLRSharedFrameworkDir)libcoreclrpal.a" />
+ <_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(CoreCLRSharedFrameworkDir)libgcinfo_unix_wasm.a" />
+ <_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(CoreCLRSharedFrameworkDir)libnativeresourcestring.a" />
<_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(HostSharedFrameworkDir)libBrowserHost.a" />
<_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(HostSharedFrameworkDir)dotnet.native.js" />
<_MicrosoftNetCoreAppRuntimePackNativeDirFiles Include="$(HostSharedFrameworkDir)dotnet.native.js.symbols" />
diff --git a/src/native/libs/Common/JavaScript/host/index.ts b/src/native/libs/Common/JavaScript/host/index.ts
index 8b2a3faf113fe0..a97f3bac247c97 100644
--- a/src/native/libs/Common/JavaScript/host/index.ts
+++ b/src/native/libs/Common/JavaScript/host/index.ts
@@ -4,6 +4,7 @@
import type { InternalExchange, BrowserHostExports, RuntimeAPI, BrowserHostExportsTable, LoaderConfigInternal } from "./types";
import { InternalExchangeIndex } from "./types";
import { _ems_ } from "../ems-ambient";
+import { ENVIRONMENT_IS_NODE } from "../per-module";
import GitHash from "consts:gitHash";
@@ -62,6 +63,18 @@ function setupEmscripten() {
throw new Error("Invalid runtime config, cannot initialize the runtime.");
}
+ const globalThisAny = globalThis as any;
+ // On Node.js, process.env is the lowest-precedence source of environment variables: it must not
+ // override values from the generated manifest (dotnet.js) or from withEnvironmentVariable().
+ if (ENVIRONMENT_IS_NODE && globalThisAny.process && globalThisAny.process.env) {
+ const processEnv = globalThisAny.process.env;
+ for (const key in processEnv) {
+ if (loaderConfig.environmentVariables[key] === undefined) {
+ loaderConfig.environmentVariables[key] = processEnv[key];
+ }
+ }
+ }
+
for (const key in loaderConfig.environmentVariables) {
_ems_.ENV[key] = loaderConfig.environmentVariables[key];
}
diff --git a/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs b/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs
index 22045ddd145fdf..6c1ec913397e55 100644
--- a/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs
+++ b/src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs
@@ -23,6 +23,7 @@ public class RunReadyToRunCompiler : ToolTask
public bool ShowCompilerWarnings { get; set; }
public bool UseCrossgen2 { get; set; }
public string Crossgen2ExtraCommandLineArgs { get; set; }
+ public string Crossgen2CompositeExtraCommandLineArgs { get; set; }
public ITaskItem[] Crossgen2PgoFiles { get; set; }
public string Crossgen2ContainerFormat { get; set; }
@@ -382,6 +383,14 @@ private string GenerateCrossgen2ResponseFile()
result.AppendLine($"-u:\"{unrooted.ItemSpec}\"");
}
}
+
+ if (!string.IsNullOrEmpty(Crossgen2CompositeExtraCommandLineArgs))
+ {
+ foreach (string extraArg in Crossgen2CompositeExtraCommandLineArgs.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
+ {
+ result.AppendLine(extraArg);
+ }
+ }
}
else
{