From 81ae8b27111f48ebffc111db124e7e38d9f2aaaf Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 20:05:54 -0500 Subject: [PATCH 01/15] [wasm] WasmAppBuilder - move the list of native assets, and logic out .. to the targets. - New property: `NativeAssets`, populated by `@(WasmNativeAsset)` - Remove property `MicrosoftNetCoreAppRuntimePackRidDir` - Also, add the `icudt.dat` file from the targets --- src/mono/wasm/build/WasmApp.targets | 18 ++++++++++++++- src/tasks/WasmAppBuilder/WasmAppBuilder.cs | 27 ++++++++-------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 18afa169ce1c12..535ca9e2251168 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -33,6 +33,7 @@ (relative path can be set via %(TargetPath) metadata) - @(WasmSatelliteAssemblies) - @(WasmFilesToIncludeInFileSystem) - Files to include in the vfs + - @(WasmNativeAsset) - Native files to be added to `NativeAssets` in the bundle. - @(WasmExtraConfig) - json elements to add to `mono-config.js` Eg. @@ -116,9 +117,23 @@ + + icudt.dat + + <_WasmNativeAssetsSrcDir Condition="'%(_WasmAssemblies.FileName)%(_WasmAssemblies.Extension)' == 'System.Private.CoreLib.dll'">%(_WasmAssemblies.RelativeDir) + <_WasmNativeAssetsSrcDir Condition="'$(_WasmNativeAssetsSrcDir)' == ''">$(MicrosoftNetCoreAppRuntimePackRidDir)native\ + + + + + + + + + + diff --git a/src/tasks/WasmAppBuilder/WasmAppBuilder.cs b/src/tasks/WasmAppBuilder/WasmAppBuilder.cs index d43a09d07e6f99..4af75e815615e1 100644 --- a/src/tasks/WasmAppBuilder/WasmAppBuilder.cs +++ b/src/tasks/WasmAppBuilder/WasmAppBuilder.cs @@ -24,15 +24,15 @@ public class WasmAppBuilder : Task [NotNull] [Required] - public string? MicrosoftNetCoreAppRuntimePackDir { get; set; } + public string? MainJS { get; set; } [NotNull] [Required] - public string? MainJS { get; set; } + public string[]? Assemblies { get; set; } [NotNull] [Required] - public string[]? Assemblies { get; set; } + public ITaskItem[]? NativeAssets { get; set; } private List _fileWrites = new(); @@ -41,7 +41,7 @@ public class WasmAppBuilder : Task // full list of ICU data files we produce can be found here: // https://github.com/dotnet/icu/tree/maint/maint-67/icu-filters - public string? IcuDataFileName { get; set; } = "icudt.dat"; + public string? IcuDataFileName { get; set; } public int DebugLevel { get; set; } public ITaskItem[]? SatelliteAssemblies { get; set; } @@ -134,15 +134,10 @@ public override bool Execute () } var _assemblies = new List(); - var runtimeSourceDir = Path.Join(MicrosoftNetCoreAppRuntimePackDir, "native"); - foreach (var asm in Assemblies) { if (!_assemblies.Contains(asm)) _assemblies.Add(asm); - - if (asm.EndsWith("System.Private.CoreLib.dll")) - runtimeSourceDir = Path.GetDirectoryName(asm); } var config = new WasmAppConfig (); @@ -163,15 +158,11 @@ public override bool Execute () } } - List nativeAssets = new List() { "dotnet.wasm", "dotnet.js", "dotnet.timezones.blat" }; - - if (!InvariantGlobalization) - nativeAssets.Add(IcuDataFileName!); - - if (Path.TrimEndingDirectorySeparator(Path.GetFullPath(runtimeSourceDir)) != Path.TrimEndingDirectorySeparator(Path.GetFullPath(AppDir!))) + foreach (ITaskItem item in NativeAssets) { - foreach (var f in nativeAssets) - FileCopyChecked(Path.Join(runtimeSourceDir, f), Path.Join(AppDir, f), "NativeAssets"); + string dest = Path.Combine(AppDir!, Path.GetFileName(item.ItemSpec)); + if (!FileCopyChecked(item.ItemSpec, dest, "NativeAssets")) + return false; } FileCopyChecked(MainJS!, Path.Join(AppDir, "runtime.js"), string.Empty); @@ -278,7 +269,7 @@ public override bool Execute () } } - return true; + return !Log.HasLoggedErrors; } private bool TryParseExtraConfigValue(ITaskItem extraItem, out object? valueObject) From b105ba4d896bbaf0221c7d75269b7d97b14f88ff Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 20:17:40 -0500 Subject: [PATCH 02/15] [wasm] Simplify handling of dotnet.{js,wasm} WasmAppBuilder has (non-obvious) logic to: 1. if AOT'ing, then use the *generated* dotnet.{js,wasm}; 2. else use the one from the runtime pack This depends on Publish having copied those files from the runtime pack to the publish directory, and then comparing paths in the builder to decide which one to use. Instead, make this the intention obvious, and clear. --- src/mono/wasm/build/WasmApp.targets | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 535ca9e2251168..645ad0eaa82bcc 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -120,13 +120,14 @@ icudt.dat - <_WasmNativeAssetsSrcDir Condition="'%(_WasmAssemblies.FileName)%(_WasmAssemblies.Extension)' == 'System.Private.CoreLib.dll'">%(_WasmAssemblies.RelativeDir) - <_WasmNativeAssetsSrcDir Condition="'$(_WasmNativeAssetsSrcDir)' == ''">$(MicrosoftNetCoreAppRuntimePackRidDir)native\ + <_HasDotnetWasm Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.wasm'">true + <_HasDotnetJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.js'">true - - + + + @@ -228,6 +229,11 @@ + + + + + From cb67f6f3c0771732b4558e01fa7b9038a6282c69 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 20:41:22 -0500 Subject: [PATCH 03/15] [wasm] Always get the native libs from the runtime pack (eg.libmono*) We were getting these from the publish directory, instead we can get them directly from the runtime pack. This includes icudt.dt, and dotnet.timezones.blat . --- src/mono/wasm/build/WasmApp.targets | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 645ad0eaa82bcc..57243b76fa38e7 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -129,8 +129,8 @@ - - + + - <_WasmObjects Include="libmono-ee-interp.a"/> - <_WasmObjects Include="libmonosgen-2.0.a"/> - <_WasmObjects Include="libmono-ilgen.a"/> - <_WasmObjects Include="libmono-icall-table.a"/> - <_WasmObjects Include="libSystem.Native.a"/> - <_WasmObjects Include="libSystem.IO.Compression.Native.a"/> - <_WasmObjects Include="libmono-profiler-aot.a"/> - <_WasmObjects Include="libicuuc.a"/> - <_WasmObjects Include="libicui18n.a"/> + <_WasmRuntimePackNativeLibs Include="libmono-ee-interp.a"/> + <_WasmRuntimePackNativeLibs Include="libmonosgen-2.0.a"/> + <_WasmRuntimePackNativeLibs Include="libmono-ilgen.a"/> + <_WasmRuntimePackNativeLibs Include="libmono-icall-table.a"/> + <_WasmRuntimePackNativeLibs Include="libSystem.Native.a"/> + <_WasmRuntimePackNativeLibs Include="libSystem.IO.Compression.Native.a"/> + <_WasmRuntimePackNativeLibs Include="libmono-profiler-aot.a"/> + <_WasmRuntimePackNativeLibs Include="libicuuc.a"/> + <_WasmRuntimePackNativeLibs Include="libicui18n.a"/> + <_WasmObjects Include="@(_WasmRuntimePackNativeLibs->'$(MicrosoftNetCoreAppRuntimePackRidDir)\native\%(FileName)%(Extension)')" /> + <_WasmObjects Include="driver.o"/> <_WasmObjects Include="pinvoke.o"/> <_WasmObjects Include="corebindings.o"/> From 48eb4e0eb3d9e1c0921eed347b2254851a2c94eb Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 20:58:23 -0500 Subject: [PATCH 04/15] [wasm] MonoAOTCompiler: add `OutputDir` property .. where we can emit the generated native files. Since these files are meant only for generating the final `dotnet.wasm`, we don't want them to put them in the bin directory. --- src/mono/wasm/build/WasmApp.targets | 1 + src/tasks/AotCompilerTask/MonoAOTCompiler.cs | 24 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 57243b76fa38e7..fa095b13cea68d 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -75,6 +75,7 @@ (); + /// + /// Directory where the AOT'ed files will be emitted + /// + [NotNull] + [Required] + public string? OutputDir { get; set; } + /// /// Assemblies which were AOT compiled. /// @@ -133,6 +141,12 @@ public override bool Execute() throw new ArgumentException($"'{nameof(Assemblies)}' is required.", nameof(Assemblies)); } + if (!Directory.Exists(OutputDir)) + { + Log.LogError($"OutputDir={OutputDir} doesn't exist"); + return false; + } + if (!string.IsNullOrEmpty(AotProfilePath) && !File.Exists(AotProfilePath)) { Log.LogError($"'{AotProfilePath}' doesn't exist.", nameof(AotProfilePath)); @@ -242,12 +256,14 @@ private bool PrecompileLibrary(ITaskItem assemblyItem) processArgs.Add("--nollvm"); } + string assemblyFilename = Path.GetFileName(assembly); + // compute output mode and file names if (parsedAotMode == MonoAotMode.LLVMOnly || parsedAotMode == MonoAotMode.AotInterp) { aotArgs.Add("llvmonly"); - string llvmBitcodeFile = Path.ChangeExtension(assembly, ".dll.bc"); + string llvmBitcodeFile = Path.Combine(OutputDir, Path.ChangeExtension(assemblyFilename, ".dll.bc")); aotAssembly.SetMetadata("LlvmBitcodeFile", llvmBitcodeFile); if (parsedAotMode == MonoAotMode.AotInterp) @@ -276,20 +292,20 @@ private bool PrecompileLibrary(ITaskItem assemblyItem) { aotArgs.Add("asmonly"); - string assemblerFile = Path.ChangeExtension(assembly, ".dll.s"); + string assemblerFile = Path.Combine(OutputDir, Path.ChangeExtension(assemblyFilename, ".dll.s")); aotArgs.Add($"outfile={assemblerFile}"); aotAssembly.SetMetadata("AssemblerFile", assemblerFile); } else { - string objectFile = Path.ChangeExtension(assembly, ".dll.o"); + string objectFile = Path.Combine(OutputDir, Path.ChangeExtension(assemblyFilename, ".dll.o")); aotArgs.Add($"outfile={objectFile}"); aotAssembly.SetMetadata("ObjectFile", objectFile); } if (UseLLVM) { - string llvmObjectFile = Path.ChangeExtension(assembly, ".dll-llvm.o"); + string llvmObjectFile = Path.Combine(OutputDir, Path.ChangeExtension(assemblyFilename, ".dll-llvm.o")); aotArgs.Add($"llvm-outfile={llvmObjectFile}"); aotAssembly.SetMetadata("LlvmObjectFile", llvmObjectFile); } From 083a89cd5444a2725b1bfbbc3ec18c6bdcda32dd Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 21:14:26 -0500 Subject: [PATCH 05/15] [wasm] Use existing list of assemblies - @(_WasmAssemblies) .. instead of trying to find them in the build dir. This build directory will become a directory for intermediate build output in upcoming commits. --- src/mono/wasm/build/WasmApp.targets | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index fa095b13cea68d..20d7934d927f2c 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -195,12 +195,11 @@ <_WasmPInvokeModules Include="libSystem.Native" /> <_WasmPInvokeModules Include="libSystem.IO.Compression.Native" /> <_WasmPInvokeModules Include="libSystem.Globalization.Native" /> - <_WasmPInvokeAssemblies Include="$(WasmBuildDir)\*.dll" /> From 06f0fce606b96581632f4997c5c220c4a4fbc08f Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 21:49:11 -0500 Subject: [PATCH 06/15] [wasm] Replace $(WasmMainAssemblyPath) with $(WasmMainAssemblyFileName) - Instead of having a special $(WasmMainAssemblyPath), and then adding it to the wasm assemblies ourselves - let the user project add all the relevant assemblies to `@(WasmAssembliesToBundle)`, which is usually as simple as `$(OutDir)\*.dll`. - This helps to simplify lot of things. - And we just need the main assembly filename for generating the run-v8.sh script. --- eng/testing/tests.mobile.targets | 2 +- .../netcore/sample/mbr/browser/WasmDelta.csproj | 1 - .../netcore/sample/wasm/Directory.Build.targets | 1 - src/mono/wasm/build/WasmApp.targets | 13 ++++++++----- .../tests/debugger-test/debugger-test.csproj | 3 ++- src/tests/Common/CLRTest.Execute.Bash.targets | 2 +- .../Common/wasm-test-runner/WasmTestRunner.proj | 3 ++- .../wasm/AOT/browser/Wasm.Aot.Browser.Test.csproj | 8 +------- .../FunctionalTests/wasm/Directory.Build.targets | 2 +- .../browser/Wasm.Interpreter.Browser.Test.csproj | 8 +------- 10 files changed, 17 insertions(+), 26 deletions(-) diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index cf570790f1a484..e9e9dba3d84d3d 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -192,7 +192,7 @@ $(BundleDir) $(PublishDir) - $(PublishDir)WasmTestRunner.dll + WasmTestRunner.dll $(MonoProjectRoot)\wasm\runtime-test.js $(InvariantGlobalization) true diff --git a/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj b/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj index 92ee7ca3fbfd5e..88835d5303d095 100644 --- a/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj +++ b/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj @@ -32,7 +32,6 @@ $(MSBuildProjectDirectory)\$(PublishDir)\ - $(WasmBuildDir)$(AssemblyName).dll diff --git a/src/mono/netcore/sample/wasm/Directory.Build.targets b/src/mono/netcore/sample/wasm/Directory.Build.targets index e2c0589757e44f..818ff16d796531 100644 --- a/src/mono/netcore/sample/wasm/Directory.Build.targets +++ b/src/mono/netcore/sample/wasm/Directory.Build.targets @@ -8,7 +8,6 @@ $(MSBuildProjectDirectory)\$(PublishDir)\ - $(WasmBuildDir)$(AssemblyName).dll diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 20d7934d927f2c..37aabe5aa9de6a 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -9,7 +9,7 @@ Public properties (required): - $(WasmBuildDir) - Directory where build artifacts are stored (required if WasmBuildNative==true) - $(WasmAppDir) - AppBundle dir - - $(WasmMainAssemblyPath) + - $(WasmMainAssemblyFileName)- Defaults to $(TargetFileName) - $(WasmMainJSPath) - $(EMSDK_PATH) - points to the emscripten sdk location. @@ -106,14 +106,16 @@ - - + + $(TargetFileName) + + - <_WasmAssemblies Include="$(WasmMainAssemblyPath);@(WasmAssembliesToBundle)" /> + <_WasmAssemblies Include="@(WasmAssembliesToBundle)" /> @@ -262,9 +264,10 @@ EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_ $(WasmAppDir)run-v8.sh + 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 91e81aeef9e739..bfed12bf2beb30 100644 --- a/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj +++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj @@ -19,7 +19,7 @@ - $(OutDir)debugger-test.dll + debugger-test.dll $(AppDir) $(MonoProjectRoot)wasm\runtime-test.js 1 @@ -28,6 +28,7 @@ + diff --git a/src/tests/Common/CLRTest.Execute.Bash.targets b/src/tests/Common/CLRTest.Execute.Bash.targets index d7b4830d8bb0c3..78f0c9c1b106f8 100644 --- a/src/tests/Common/CLRTest.Execute.Bash.targets +++ b/src/tests/Common/CLRTest.Execute.Bash.targets @@ -274,7 +274,7 @@ else __Command+=" dotnet" fi -$__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreAppCurrent=$(NetCoreAppCurrent) /p:TestAssembly=`pwd`/$(MsBuildProjectName).dll /p:TestBinDir=`pwd` || exit $? +$__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreAppCurrent=$(NetCoreAppCurrent) /p:TestAssembly=$(MsBuildProjectName).dll /p:TestBinDir=`pwd` || exit $? ]]> diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj index 99c21b0560a6d1..1f64eaec09a380 100644 --- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj +++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj @@ -16,7 +16,7 @@ - $(TestAssembly) + $(TestAssembly) $(AppDir) $(CORE_ROOT)\runtime-test\runtime-test.js true @@ -25,6 +25,7 @@ + diff --git a/src/tests/FunctionalTests/wasm/AOT/browser/Wasm.Aot.Browser.Test.csproj b/src/tests/FunctionalTests/wasm/AOT/browser/Wasm.Aot.Browser.Test.csproj index 0a84ee716ea009..bd206a8dff8380 100644 --- a/src/tests/FunctionalTests/wasm/AOT/browser/Wasm.Aot.Browser.Test.csproj +++ b/src/tests/FunctionalTests/wasm/AOT/browser/Wasm.Aot.Browser.Test.csproj @@ -3,6 +3,7 @@ true WasmTestOnBrowser 42 + runtime.js @@ -15,11 +16,4 @@ - - - - $(PublishDir)Wasm.AOT.Browser.Test.dll - runtime.js - - diff --git a/src/tests/FunctionalTests/wasm/Directory.Build.targets b/src/tests/FunctionalTests/wasm/Directory.Build.targets index 55390cd9c918b0..b37d8d01ca1b84 100644 --- a/src/tests/FunctionalTests/wasm/Directory.Build.targets +++ b/src/tests/FunctionalTests/wasm/Directory.Build.targets @@ -9,7 +9,7 @@ $(OutputPath)\$(Configuration)\AppBundle\ $(PublishDir) - $(WasmBuildDir)$(AssemblyName).dll + $(AssemblyName).dll diff --git a/src/tests/FunctionalTests/wasm/Interpreter/browser/Wasm.Interpreter.Browser.Test.csproj b/src/tests/FunctionalTests/wasm/Interpreter/browser/Wasm.Interpreter.Browser.Test.csproj index 47c4c6c69c71d5..db384e014d64af 100644 --- a/src/tests/FunctionalTests/wasm/Interpreter/browser/Wasm.Interpreter.Browser.Test.csproj +++ b/src/tests/FunctionalTests/wasm/Interpreter/browser/Wasm.Interpreter.Browser.Test.csproj @@ -5,6 +5,7 @@ true WasmTestOnBrowser 42 + runtime.js @@ -16,11 +17,4 @@ - - - - $(PublishDir)Wasm.Interpreter.Browser.Test.dll - runtime.js - - From 3de972ad105e1c7d71f3a308e17f99c7b148f72c Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 22:02:29 -0500 Subject: [PATCH 07/15] [wasm] Rename WasmBuildDir -> _WasmIntermediateOutputPath Based on the changes in previous commits, we can now remove `$(WasmBuildDir)`, and replace that with an internal `$(_WasmIntermediateOutputPath)`. This path will have all the build artifacts generated that aren't required in the app bundle. Earlier, we were using the publish directory for that, which resulted in it being littered with unncessary files, and files getting copied to the app bundle from unclear sources, and for non-obvious reasons. --- eng/testing/tests.mobile.targets | 1 - .../sample/mbr/browser/WasmDelta.csproj | 4 -- .../sample/wasm/Directory.Build.targets | 3 -- src/mono/wasm/build/WasmApp.targets | 42 +++++++++++-------- .../wasm/Directory.Build.targets | 6 +-- 5 files changed, 25 insertions(+), 31 deletions(-) diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index e9e9dba3d84d3d..31e2a3afa2ed53 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -191,7 +191,6 @@ $(BundleDir) - $(PublishDir) WasmTestRunner.dll $(MonoProjectRoot)\wasm\runtime-test.js $(InvariantGlobalization) diff --git a/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj b/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj index 88835d5303d095..322a01ba8595a7 100644 --- a/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj +++ b/src/mono/netcore/sample/mbr/browser/WasmDelta.csproj @@ -30,10 +30,6 @@ - - $(MSBuildProjectDirectory)\$(PublishDir)\ - - diff --git a/src/mono/netcore/sample/wasm/Directory.Build.targets b/src/mono/netcore/sample/wasm/Directory.Build.targets index 818ff16d796531..640ae9b714d3ff 100644 --- a/src/mono/netcore/sample/wasm/Directory.Build.targets +++ b/src/mono/netcore/sample/wasm/Directory.Build.targets @@ -6,9 +6,6 @@ - - $(MSBuildProjectDirectory)\$(PublishDir)\ - diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 37aabe5aa9de6a..988f1148e2d374 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -7,7 +7,6 @@ + + OutputPath="$(_WasmIntermediateOutputPath)pinvoke-table.h" /> <_WasmRuntimePackNativeLibs Include="libmono-ee-interp.a"/> @@ -224,19 +230,19 @@ <_WasmIncludeDir>$(MicrosoftNetCoreAppRuntimePackRidDir)native/include <_WasmSrcDir>$(MicrosoftNetCoreAppRuntimePackRidDir)native/src - $(EmccFlags) -DCORE_BINDINGS -DGEN_PINVOKE=1 -I$(WasmBuildDir) -I$(_WasmIncludeDir)/mono-2.0 -I$(_WasmIncludeDir)/wasm + $(EmccFlags) -DCORE_BINDINGS -DGEN_PINVOKE=1 -I$(_WasmIntermediateOutputPath) -I$(_WasmIncludeDir)/mono-2.0 -I$(_WasmIncludeDir)/wasm $(EmccFlags) -s TOTAL_MEMORY=536870912 - - - - - + + + + + - - + + @@ -248,7 +254,7 @@ void mono_profiler_init_aot (const char *desc)%3B EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_profiler_init_aot (desc)%3B } - <_DriverGenCPath>$(WasmBuildDir)driver-gen.c + <_DriverGenCPath>$(_WasmIntermediateOutputPath)driver-gen.c diff --git a/src/tests/FunctionalTests/wasm/Directory.Build.targets b/src/tests/FunctionalTests/wasm/Directory.Build.targets index b37d8d01ca1b84..b0d320fabe3776 100644 --- a/src/tests/FunctionalTests/wasm/Directory.Build.targets +++ b/src/tests/FunctionalTests/wasm/Directory.Build.targets @@ -3,14 +3,10 @@ PrepareForWasmBuild;$(WasmBuildAppDependsOn) + $(OutputPath)\$(Configuration)\AppBundle\ - - $(OutputPath)\$(Configuration)\AppBundle\ - $(PublishDir) - $(AssemblyName).dll - From b6409c71202862d007c41447a9955712b014775b Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 23:01:39 -0500 Subject: [PATCH 08/15] [wasm] add default value for $(WasmAppDir) --- src/mono/wasm/build/WasmApp.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 988f1148e2d374..1cd592a3026fa9 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -111,6 +111,7 @@ + $(OutputPath)AppBundle\ $(TargetFileName) <_WasmIntermediateOutputPath>$(IntermediateOutputPath)\wasm\ From 96ac11406d5484485fa12fe0757e2fe101108d4a Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 21 Jan 2021 23:04:38 -0500 Subject: [PATCH 09/15] [wasm] WasmApp.targets - misc cleanup --- src/mono/wasm/build/WasmApp.InTree.targets | 2 +- src/mono/wasm/build/WasmApp.targets | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.InTree.targets b/src/mono/wasm/build/WasmApp.InTree.targets index c5191b62d23357..7f1f3550e959ee 100644 --- a/src/mono/wasm/build/WasmApp.InTree.targets +++ b/src/mono/wasm/build/WasmApp.InTree.targets @@ -10,7 +10,7 @@ $(ArtifactsBinDir)microsoft.netcore.app.runtime.browser-wasm\$(Configuration) - + diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 1cd592a3026fa9..184ef295f4f368 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -7,12 +7,12 @@