diff --git a/eng/Subsets.props b/eng/Subsets.props index b27d1e55a8bdd..1ee523968b4cd 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -162,6 +162,10 @@ + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 03d6fa578859f..97502a6ef93c1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -118,6 +118,10 @@ https://github.com/dotnet/runtime-assets 629993236116221fba87fe1de6d7893dd02c3722 + + https://github.com/dotnet/icu + + https://github.com/dotnet/llvm-project 266c9f5b5c1e94333e01ca77fa74d76563969842 diff --git a/eng/Versions.props b/eng/Versions.props index 50c9c298688f7..246794d5f9a06 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -117,6 +117,8 @@ 3.0.0-preview-20200602.3 5.0.0-preview.3.20359.3 + + 5.0.0-preview.8.20359.5 9.0.1-alpha.1.20356.1 9.0.1-alpha.1.20356.1 diff --git a/src/mono/configure.ac b/src/mono/configure.ac index befd0f6fa2a12..bab7614ef1748 100644 --- a/src/mono/configure.ac +++ b/src/mono/configure.ac @@ -146,7 +146,7 @@ case "$host" in CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -s WASM=1" CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -s WASM=1" libgc_threads=pthreads - platform_wasm=yes + host_wasm=yes # FIXME: RID="osx-x64" COREARCH="wasm32" @@ -584,7 +584,7 @@ AM_CONDITIONAL(HOST_SIGPOSIX, test x$use_sigposix = xyes) AM_CONDITIONAL(HOST_ANDROID, test x$platform_android = xyes) AM_CONDITIONAL(HOST_TIZEN, test x$platform_tizen = xyes) AM_CONDITIONAL(HOST_IOS, test x$platform_ios = xyes) -AM_CONDITIONAL(HOST_WASM, test x$platform_wasm = xyes) +AM_CONDITIONAL(HOST_WASM, test x$host_wasm = xyes) AM_CONDITIONAL(HOST_AIX, test x$host_aix = xyes) if test -z "$HOST_DARWIN_TRUE"; then : @@ -6867,6 +6867,9 @@ if test x$with_core = xonly; then elif test x$host_sunos = xyes; then ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option" have_sys_icu=yes + elif test x$host_wasm = xyes; then + ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option" + have_sys_icu=yes else GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM" fi diff --git a/src/mono/mono.proj b/src/mono/mono.proj index be67580a2e204..4fef851583119 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -637,7 +637,10 @@ <_MonoConfigureParams Include="--with-bitcode=yes"/> <_MonoConfigureParams Include="--enable-minimal=ssa,com,jit,reflection_emit_save,portability,assembly_remapping,attach,verifier,full_messages,appdomains,shadowcopy,security,sgen_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,logging,remoting,shared_perfcounters,sgen_debug_helpers,soft_debug,interpreter,assert_messages,cleanup,mdb,gac,threads,$(_MonoEnableMinimal)"/> <_MonoCFLAGS Include="-fexceptions" /> - <_MonoCXXFLAGS Include="-fexceptions -s DISABLE_EXCEPTION_CATCHING=0" /> + <_MonoCFLAGS Include="-I$(NuGetPackageRoot)/microsoft.netcore.runtime.icu.transport/$(MicrosoftNETCoreRuntimeICUTransportVersion)/runtimes/browser-wasm/native/include" /> + <_MonoCXXFLAGS Include="-fexceptions" /> + <_MonoCXXFLAGS Include="-I$(NuGetPackageRoot)/microsoft.netcore.runtime.icu.transport/$(MicrosoftNETCoreRuntimeICUTransportVersion)/runtimes/browser-wasm/native/include" /> + <_MonoCXXFLAGS Include="-s DISABLE_EXCEPTION_CATCHING=0" /> <_MonoAC_VARS Include="ac_cv_func_shm_open_working_with_mmap=no" /> diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index cf1a8931f5ef1..6fd32038f7282 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -15,6 +15,7 @@ PINVOKE_TABLE?=$(TOP)/artifacts/obj/wasm/pinvoke-table.h MONO_BIN_DIR?=$(BINDIR)/mono/Browser.wasm.$(CONFIG) NATIVE_DIR?=$(OBJDIR)/native/net5.0-Browser-$(CONFIG)-wasm BUILDS_BIN_DIR?=$(BINDIR)/native/net5.0-Browser-$(CONFIG)-wasm +ICU_LIBDIR?= all: build-native timezone-data @@ -51,7 +52,9 @@ MONO_LIBS = \ $(MONO_BIN_DIR)/libmono-ilgen.a \ $(MONO_BIN_DIR)/libmono-icall-table.a \ ${NATIVE_DIR}/System.Native/libSystem.Native.a \ - ${NATIVE_DIR}/System.IO.Compression.Native/libSystem.IO.Compression.Native.a + ${NATIVE_DIR}/System.IO.Compression.Native/libSystem.IO.Compression.Native.a \ + $(ICU_LIBDIR)/libicuuc.a \ + $(ICU_LIBDIR)/libicui18n.a EMCC_FLAGS=--profiling-funcs -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'FS_createPath', 'FS_createDataFile', 'cwrap', 'setValue', 'getValue', 'UTF8ToString', 'UTF8ArrayToString', 'addFunction']" -s "EXPORTED_FUNCTIONS=['_putchar']" --source-map-base http://example.com -emit-llvm -s FORCE_FILESYSTEM=1 -s USE_ZLIB=1 EMCC_DEBUG_FLAGS =-g -Os -s ASSERTIONS=1 -DENABLE_NETCORE=1 -DDEBUG=1 @@ -112,7 +115,7 @@ timezone-data: cp runtime/dotnet.timezones.blat $(BUILDS_BIN_DIR) runtime: - EMSDK_PATH=$(TOP)/src/mono/wasm/emsdk $(TOP)/build.sh --subset mono --arch wasm --os Browser -c $(CONFIG) + EMSDK_PATH=$(TOP)/src/mono/wasm/emsdk $(TOP)/build.sh --subset mono --arch wasm --os Browser -c $(CONFIG) /p:ContinueOnError=false /p:StopOnFirstFailure=true build-all: EMSDK_PATH=$(TOP)/src/mono/wasm/emsdk $(TOP)/build.sh --subset mono+libs --arch wasm --os Browser -c $(CONFIG) diff --git a/src/mono/wasm/icu-init.proj b/src/mono/wasm/icu-init.proj new file mode 100644 index 0000000000000..436889335eced --- /dev/null +++ b/src/mono/wasm/icu-init.proj @@ -0,0 +1,13 @@ + + + + + + $(NetCoreAppCurrent) + + + + + + + diff --git a/src/mono/wasm/wasm.targets b/src/mono/wasm/wasm.targets index f92ffb7790983..b3aa4c15b2bee 100644 --- a/src/mono/wasm/wasm.targets +++ b/src/mono/wasm/wasm.targets @@ -10,6 +10,7 @@ + @@ -41,7 +42,7 @@ - +