diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index b4e7fb22dfa962..4e36825e52adac 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -211,7 +211,7 @@ $([System.IO.Directory]::GetParent('%(Identity)').Name) - + diff --git a/src/mono/sample/mbr/browser/WasmDelta.csproj b/src/mono/sample/mbr/browser/WasmDelta.csproj index 322a01ba8595a7..c5b33a4dbecfca 100644 --- a/src/mono/sample/mbr/browser/WasmDelta.csproj +++ b/src/mono/sample/mbr/browser/WasmDelta.csproj @@ -31,7 +31,7 @@ - + \%(_DeltaFileForPublish.Filename)%(_DeltaFileForPublish.Extension) diff --git a/src/mono/sample/wasm/Directory.Build.targets b/src/mono/sample/wasm/Directory.Build.targets index 6a83bb38c13471..6f0f0baa36405e 100644 --- a/src/mono/sample/wasm/Directory.Build.targets +++ b/src/mono/sample/wasm/Directory.Build.targets @@ -1,7 +1,7 @@ - + diff --git a/src/mono/wasm/build/README.md b/src/mono/wasm/build/README.md index 281d1dccb445f8..33a838e173517e 100644 --- a/src/mono/wasm/build/README.md +++ b/src/mono/wasm/build/README.md @@ -12,16 +12,16 @@ various properties before the target `WasmBuildApp` gets executed. to do that. - By default, the `WasmLoadAssembliesAndReferences` task is not run, and -the specified `@(WasmAssembliesToBundle)` are directly passed to +the specified `@(WasmAssembly)` are directly passed to `WasmAppBuilder`. - If the project needs assembly dependencies to be resolved, then set `$(WasmResolveAssembliesBeforeBuild) == true`. - Should you need to run the AOT toolset, ensure `$(RunAOTCompilation) == true` and set `$(WasmAOTDir)` to the directory that you want to AOT. Make sure that both - `@(WasmAssembliesToBundle)` and `$(WasmAOTDir)` are absolute paths. + `@(WasmAssembly)` and `$(WasmAOTDir)` are absolute paths. - Assemblies to be bundled with the app are set via -`@(WasmAssembliesToBundle)` (which optionally will have dependencies +`@(WasmAssembly)` (which optionally will have dependencies resolved) The various task inputs correspond to properties as: @@ -29,7 +29,7 @@ The various task inputs correspond to properties as: ``` AssemblySearchPaths : @(WasmAssemblySearchPaths) - Assemblies : @(WasmAssembliesToBundle) + Assemblies : @(WasmAssembly) AppDir : $(WasmAppDir) MainAssembly : $(WasmMainAssemblyPath) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index d041b0a5aac9c9..266357d29b6326 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -8,7 +8,7 @@ - + - <_WasmAssemblies Remove="@(_WasmAssemblies)" /> - <_WasmAssemblies Include="@(_WasmStrippedAssemblies)" /> + <_WasmAssemblyInternal Remove="@(_WasmAssemblyInternal)" /> + <_WasmAssemblyInternal Include="@(_WasmStrippedAssemblies)" /> - + - <_WasmAssemblies Remove="@(_WasmAssemblies)" /> - <_WasmAssemblies Include="@(_TmpWasmAssemblies)" /> + <_WasmAssemblyInternal Remove="@(_WasmAssemblyInternal)" /> + <_WasmAssemblyInternal Include="@(_TmpWasmAssembly)" /> @@ -168,7 +168,7 @@ $(MicrosoftNetCoreAppRuntimePackRidDir)\ - <_WasmAssemblies Include="@(WasmAssembliesToBundle)" /> + <_WasmAssemblyInternal Include="@(WasmAssembly)" /> @@ -196,7 +196,7 @@ - + $(EmccFlags) -DLINK_ICALLS=1 + <_WasmIncludeDir>$(MicrosoftNetCoreAppRuntimePackRidDir)native/include + <_WasmSrcDir>$(MicrosoftNetCoreAppRuntimePackRidDir)native/src @@ -260,39 +262,45 @@ <_WasmRuntimePackNativeLibs Include="libmono-profiler-aot.a"/> <_WasmRuntimePackNativeLibs Include="libicuuc.a" Condition="'$(InvariantGlobalization)' != 'true'" /> <_WasmRuntimePackNativeLibs Include="libicui18n.a" Condition="'$(InvariantGlobalization)' != 'true'" /> + + <_WasmObjectsToBuild Include="$(_WasmIntermediateOutputPath)driver.o"/> + <_WasmObjectsToBuild Include="$(_WasmIntermediateOutputPath)pinvoke.o"/> + <_WasmObjectsToBuild Include="$(_WasmIntermediateOutputPath)corebindings.o"/> + <_WasmObjects Include="@(_WasmRuntimePackNativeLibs->'$(MicrosoftNetCoreAppRuntimePackRidDir)\native\%(FileName)%(Extension)')" /> + <_WasmObjects Include="@(_WasmObjectsToBuild)" /> - <_WasmObjects Include="$(_WasmIntermediateOutputPath)driver.o"/> - <_WasmObjects Include="$(_WasmIntermediateOutputPath)pinvoke.o"/> - <_WasmObjects Include="$(_WasmIntermediateOutputPath)corebindings.o"/> + <_DotnetJSSrcFile Include="$(_WasmSrcDir)/library_mono.js" /> + <_DotnetJSSrcFile Include="$(_WasmSrcDir)/binding_support.js" /> + <_DotnetJSSrcFile Include="$(_WasmSrcDir)/dotnet_support.js" /> + <_DotnetJSSrcFile Include="$(_WasmSrcDir)/pal_random.js" /> - <_BitcodeFile Include="%(_WasmAssemblies.LlvmBitcodeFile)" /> + <_BitcodeFile Include="%(_WasmAssemblyInternal.LlvmBitcodeFile)" /> - + - <_WasmIncludeDir>$(MicrosoftNetCoreAppRuntimePackRidDir)native/include - <_WasmSrcDir>$(MicrosoftNetCoreAppRuntimePackRidDir)native/src - $(EmccFlags) -DCORE_BINDINGS -DGEN_PINVOKE=1 -I$(_WasmIntermediateOutputPath) -I$(_WasmIncludeDir)/mono-2.0 -I$(_WasmIncludeDir)/wasm + $(EmccFlags) -g -DCORE_BINDINGS -DGEN_PINVOKE=1 "-I$(_WasmIncludeDir)/mono-2.0" "-I$(_WasmIncludeDir)/wasm" + + + $(EmccCFlags) "-I$(_WasmIntermediateOutputPath)"" + $(EmccCFlags) "-I$(_WasmIntermediateOutputPath)" + $(EmccFlags) -s TOTAL_MEMORY=536870912 <_WasmOptCommand>$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'upstream', 'bin', 'wasm-opt$(_ExeExt)')) - - - - - + + + + - - - @@ -356,7 +364,7 @@ EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_ - + diff --git a/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj b/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj index 988b3b2e5d9a0d..0dfb171f383ba9 100644 --- a/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj +++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj @@ -27,7 +27,7 @@ - + diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs index 7e5baee6f81dd7..fd756737685ec6 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs @@ -255,7 +255,7 @@ private bool PrecompileLibrary(ITaskItem assemblyItem, string? monoPaths) processArgs.AddRange(p.Split(";", StringSplitOptions.RemoveEmptyEntries)); } - Utils.LogInfo($"[AOT] {assembly}"); + Log.LogMessage(MessageImportance.Low, $"[AOT] {assembly}"); processArgs.Add("--debug"); @@ -361,7 +361,7 @@ private bool PrecompileLibrary(ITaskItem assemblyItem, string? monoPaths) try { // run the AOT compiler - Utils.RunProcess(CompilerBinaryPath, string.Join(" ", processArgs), envVariables, directory, silent: false, outputMessageImportance: MessageImportance.Low); + Utils.RunProcess(CompilerBinaryPath, string.Join(" ", processArgs), envVariables, directory, silent: false, outputMessageImportance: MessageImportance.Low, logMessageImportance: MessageImportance.Low); } catch (Exception ex) { diff --git a/src/tasks/Common/Utils.cs b/src/tasks/Common/Utils.cs index 97b8e5cf0e5cf3..ecd01ef4500b67 100644 --- a/src/tasks/Common/Utils.cs +++ b/src/tasks/Common/Utils.cs @@ -28,9 +28,10 @@ public static string RunProcess( string? workingDir = null, bool ignoreErrors = false, bool silent = true, - MessageImportance outputMessageImportance=MessageImportance.High) + MessageImportance outputMessageImportance=MessageImportance.High, + MessageImportance logMessageImportance=MessageImportance.High) { - LogInfo($"Running: {path} {args}"); + LogInfo($"Running: {path} {args}", logMessageImportance); var outputBuilder = new StringBuilder(); var errorBuilder = new StringBuilder(); var processStartInfo = new ProcessStartInfo diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj index c28b704c4f3bed..eac97cd0f2c346 100644 --- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj +++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj @@ -25,8 +25,8 @@ - - + + diff --git a/src/tests/FunctionalTests/wasm/Directory.Build.targets b/src/tests/FunctionalTests/wasm/Directory.Build.targets index b0d320fabe3776..ba6525b01a3b22 100644 --- a/src/tests/FunctionalTests/wasm/Directory.Build.targets +++ b/src/tests/FunctionalTests/wasm/Directory.Build.targets @@ -8,7 +8,7 @@ - +