From 8acbb2495781191f7c8f731fc81389a562b3e876 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Fri, 26 Mar 2021 18:27:30 -0400 Subject: [PATCH 1/3] [wasm] Fix order of include paths, to have the obj dir first this regressed recently, and we started using `pinvoke-table.h`, and `icall-table.h` from the runtime pack instead of from the obj dir. --- src/mono/wasm/build/WasmApp.targets | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 287f963beabd76..47b8347105b2ea 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -470,20 +470,17 @@ + + <_EmccIncludePaths Include="$(_WasmIntermediateOutputPath.TrimEnd('\/'))" /> + <_EmccIncludePaths Include="$(_WasmIncludeDir)mono-2.0" /> + <_EmccIncludePaths Include="$(_WasmIncludeDir)wasm" /> + + $(EmccFlags) -DCORE_BINDINGS -DGEN_PINVOKE=1 + $(EmccCFlags) @(_EmccIncludePaths -> '"-I%(Identity)"', ' ') $(EmccCFlags) -g - - $(EmccCFlags) "-I$(_WasmIntermediateOutputPath)." - $(EmccCFlags) "-I$(_WasmIntermediateOutputPath)" - - $(EmccCFlags) "-I$(_WasmRuntimePackIncludeDir)mono-2.0" "-I$(_WasmRuntimePackIncludeDir)wasm" - $(EmccFlags) -s TOTAL_MEMORY=536870912 <_WasmOptCommand>$([MSBuild]::NormalizePath('$(EmSdkUpstreamBinPath)', 'wasm-opt$(_ExeExt)')) From 9b5585724f9b98cd1766bc031c57fd6f568785b8 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 6 Apr 2021 16:35:54 -0400 Subject: [PATCH 2/3] [wasm] Don't include pinvoke-table.h in the runtime pack. `pinvoke-table.h` is generated when building the native files for wasm. They are not required in the runtime pack, as any wasm app build needing to do native relinking would be generating one of it's own. --- .../pkg/sfx/Microsoft.NETCore.App/Directory.Build.props | 1 - src/mono/wasm/Makefile | 2 +- src/mono/wasm/build/WasmApp.targets | 1 - src/mono/wasm/wasm.proj | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props index e01cf16aae410c..bc114a7ec5c1bb 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props @@ -194,7 +194,6 @@ - diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index 4777abfb104c00..539547edd8214c 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -144,7 +144,7 @@ icu-files: $(wildcard $(ICU_LIBDIR)/*.dat) $(ICU_LIBDIR)/libicuuc.a $(ICU_LIBDIR source-files: runtime/driver.c runtime/pinvoke.c runtime/corebindings.c runtime/binding_support.js runtime/dotnet_support.js runtime/library_mono.js $(SYSTEM_NATIVE_LIBDIR)/pal_random.js | $(NATIVE_BIN_DIR)/src cp $^ $(NATIVE_BIN_DIR)/src -header-files: runtime/pinvoke.h $(BUILDS_OBJ_DIR)/pinvoke-table.h | $(NATIVE_BIN_DIR)/include/wasm +header-files: runtime/pinvoke.h | $(NATIVE_BIN_DIR)/include/wasm cp $^ $(NATIVE_BIN_DIR)/include/wasm # Helper targets diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 47b8347105b2ea..c7d6f05066440c 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -421,7 +421,6 @@ <_WasmPInvokeModules Include="libSystem.IO.Compression.Native" /> <_WasmPInvokeModules Include="libSystem.Globalization.Native" /> - - From d97fcf3fc4a34f76bcb853b1d5362dd417be6995 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 6 Apr 2021 19:06:36 -0400 Subject: [PATCH 3/3] Fix the property name --- src/mono/wasm/build/WasmApp.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index c7d6f05066440c..1ed6c9583b0594 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -471,8 +471,8 @@ <_EmccIncludePaths Include="$(_WasmIntermediateOutputPath.TrimEnd('\/'))" /> - <_EmccIncludePaths Include="$(_WasmIncludeDir)mono-2.0" /> - <_EmccIncludePaths Include="$(_WasmIncludeDir)wasm" /> + <_EmccIncludePaths Include="$(_WasmRuntimePackIncludeDir)mono-2.0" /> + <_EmccIncludePaths Include="$(_WasmRuntimePackIncludeDir)wasm" />