<ProjectToBuild Include="$(MonoProjectRoot)llvm\llvm-init.proj" Category="mono" />
</ItemGroup>
+ <ItemGroup Condition="'$(TargetOS)' == 'Browser'">
+ <ProjectToBuild Include="$(MonoProjectRoot)wasm\icu-init.proj" Category="mono" />
+ </ItemGroup>
+
<ItemGroup Condition="$(_subset.Contains('+mono.runtime+'))">
<ProjectToBuild Include="$(MonoProjectRoot)mono.proj" Category="mono" />
</ItemGroup>
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>629993236116221fba87fe1de6d7893dd02c3722</Sha>
</Dependency>
+ <Dependency Name="Microsoft.NETCore.Runtime.ICU.Transport" Version="5.0.0-preview.8.20359.5">
+ <Uri>https://github.com/dotnet/icu</Uri>
+ <Sha />
+ </Dependency>
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="9.0.1-alpha.1.20356.1">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>266c9f5b5c1e94333e01ca77fa74d76563969842</Sha>
<MicrosoftPrivateIntellisenseVersion>3.0.0-preview-20200602.3</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
<MicrosoftNETILLinkTasksVersion>5.0.0-preview.3.20359.3</MicrosoftNETILLinkTasksVersion>
+ <!-- ICU -->
+ <MicrosoftNETCoreRuntimeICUTransportVersion>5.0.0-preview.8.20359.5</MicrosoftNETCoreRuntimeICUTransportVersion>
<!-- Mono LLVM -->
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>9.0.1-alpha.1.20356.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>9.0.1-alpha.1.20356.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
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"
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 :
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
<_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" />
<!-- AOT cross-compiler configuration -->
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
$(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
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)
--- /dev/null
+<Project Sdk="Microsoft.Build.NoTargets">
+
+ <!-- This project installs the wasm ICU nupkg -->
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.NETCore.Runtime.ICU.Transport" PrivateAssets="all" Version="$(MicrosoftNETCoreRuntimeICUTransportVersion)" GeneratePathProperty="true" />
+ </ItemGroup>
+
+</Project>
<ItemGroup>
<WasmPInvokeModules Include="libSystem.Native"/>
<WasmPInvokeModules Include="libSystem.IO.Compression.Native"/>
+ <WasmPInvokeModules Include="libSystem.Globalization.Native"/>
<WasmPInvokeAssemblies Include="$(MonoArtifactsPath)\System.Private.CoreLib.dll"/>
<WasmPInvokeAssemblies Include="$(ArtifactsBinDir)\System.Runtime\$(NetCoreAppCurrent)-$(Configuration)\System.Runtime.dll"/>
<WasmPInvokeAssemblies Include="$(ArtifactsBinDir)\System.Console\$(NetCoreAppCurrent)-Browser-$(Configuration)\System.Console.dll"/>
<Target Name="BuildWasmRuntimes"
DependsOnTargets="BuildPInvokeTable">
- <Exec Command="make -C $(MonoProjectRoot)wasm all SHELL=/bin/bash BINDIR=$(ArtifactsBinDir) MONO_BIN_DIR=$(MonoArtifactsPath) OBJDIR=$(ArtifactsObjDir) BUILDS_BIN_DIR=$(NativeBinDir) NATIVE_DIR=$(ArtifactsObjDir)/native/$(NetCoreAppCurrent)-$(TargetOS)-$(Configuration)-$(TargetArchitecture) CONFIG=$(Configuration) PINVOKE_TABLE=$(WasmPInvokeTablePath)" IgnoreStandardErrorWarningFormat="true"/>
+ <Exec Command="make -C $(MonoProjectRoot)wasm all SHELL=/bin/bash BINDIR=$(ArtifactsBinDir) MONO_BIN_DIR=$(MonoArtifactsPath) OBJDIR=$(ArtifactsObjDir) BUILDS_BIN_DIR=$(NativeBinDir) NATIVE_DIR=$(ArtifactsObjDir)/native/$(NetCoreAppCurrent)-$(TargetOS)-$(Configuration)-$(TargetArchitecture) CONFIG=$(Configuration) PINVOKE_TABLE=$(WasmPInvokeTablePath) ICU_LIBDIR=$(NuGetPackageRoot)/microsoft.netcore.runtime.icu.transport/$(MicrosoftNETCoreRuntimeICUTransportVersion)/runtimes/browser-wasm/native/lib" IgnoreStandardErrorWarningFormat="true"/>
</Target>
</Project>