Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2018-10-11 23:33:37 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2018-10-11 23:33:37 +0300
commit92ebd1793bcd71681f9e07ade5e3a9afa0872cda (patch)
treef131d72073555b582e6e97fc23447797a5891b04
parent2c3ad9d4580b2e967075a4468be865a015e6ffae (diff)
[wasm] Fix the build. (#11063)
-rw-r--r--sdks/builds/Makefile4
-rw-r--r--sdks/builds/wasm.mk16
-rw-r--r--sdks/wasm/driver.c2
-rw-r--r--sdks/wasm/packager.cs6
4 files changed, 14 insertions, 14 deletions
diff --git a/sdks/builds/Makefile b/sdks/builds/Makefile
index 9bc479ac68c..b8760eb1131 100644
--- a/sdks/builds/Makefile
+++ b/sdks/builds/Makefile
@@ -17,10 +17,6 @@ ifneq ($(UNAME),Darwin)
DISABLE_IOS=1
endif
-ifndef ENABLE_WASM_CROSS
-DISABLE_WASM_CROSS=1
-endif
-
include $(TOP)/sdks/versions.mk
include $(TOP)/sdks/paths.mk
diff --git a/sdks/builds/wasm.mk b/sdks/builds/wasm.mk
index f6eeaea77f8..5c55bf9d469 100644
--- a/sdks/builds/wasm.mk
+++ b/sdks/builds/wasm.mk
@@ -35,7 +35,7 @@ WASM_RUNTIME_CONFIGURE_FLAGS = \
--enable-icall-export \
--disable-icall-tables \
--with-bitcode=yes \
- $(if $(ENABLE_CXX),--enable-cxx)
+ $(if $(ENABLE_CXX),--enable-cxx) \
CFLAGS="-fexceptions"
.stamp-wasm-runtime-toolchain:
@@ -88,17 +88,19 @@ _wasm-$(1)_CONFIGURE_FLAGS= \
--disable-nls \
--disable-support-build \
--enable-maintainer-mode \
- --enable-minimal=appdomains,com,remoting
+ --enable-minimal=appdomains,com,remoting \
+ --enable-icall-symbol-map \
+ --with-cross-offsets=wasm32-unknown-none.h
$$(eval $$(call CrossRuntimeTemplate,wasm-$(1),$$(if $$(filter $$(UNAME),Darwin),$(2)-apple-darwin10,$$(if $$(filter $$(UNAME),Linux),$(2)-linux-gnu,$$(error "Unknown UNAME='$$(UNAME)'"))),$(3)-unknown-none,$(4),$(5),$(6)))
+ifdef ENABLE_WASM_CROSS
wasm_TARGETS += wasm-$(1)-$$(CONFIGURATION) $(5)
+endif
endef
-ifeq ($(DISABLE_WASM_CROSS),)
$(eval $(call WasmCrossTemplate,cross,i686,wasm32,wasm-runtime,llvm-llvm32,wasm32-unknown-unknown))
-endif
##
# Parameters
@@ -150,19 +152,19 @@ _wasm-$(1)_CONFIGURE_FLAGS= \
--enable-minimal=appdomains,com,remoting \
--with-tls=pthread \
--enable-icall-symbol-map \
- --with-cross-offsets=wasm-offsets.h
+ --with-cross-offsets=wasm32-unknown-none.h
.stamp-wasm-$(1)-$$(CONFIGURATION)-configure: | $$(if $$(IGNORE_PROVISION_MXE),,provision-mxe)
$$(eval $$(call CrossRuntimeTemplate,wasm-$(1),$(2)-w64-mingw32$$(if $$(filter $(UNAME),Darwin),.static),$(3)-unknown-none,$(4),$(5),$(6)))
+ifdef ENABLE_WASM_CROSS
wasm_TARGETS += wasm-$(1)-$$(CONFIGURATION) $(5)
+endif
endef
-ifeq ($(DISABLE_WASM_CROSS),)
$(eval $(call WasmCrossMXETemplate,cross-win,i686,wasm32,wasm-runtime,llvm-llvmwin32,wasm32-unknown-unknown))
-endif
##
# Parameters
diff --git a/sdks/wasm/driver.c b/sdks/wasm/driver.c
index 3b957380daf..c501fe316c7 100644
--- a/sdks/wasm/driver.c
+++ b/sdks/wasm/driver.c
@@ -280,6 +280,8 @@ mono_wasm_load_runtime (const char *managed_path, int enable_debugging)
mono_wasm_enable_debugging ();
#endif
+ mono_icall_table_init ();
+
#ifndef ENABLE_AOT
mono_ee_interp_init ("");
mono_marshal_ilgen_init ();
diff --git a/sdks/wasm/packager.cs b/sdks/wasm/packager.cs
index 11bdf888d5e..4213d9b6d30 100644
--- a/sdks/wasm/packager.cs
+++ b/sdks/wasm/packager.cs
@@ -320,7 +320,7 @@ class Driver {
string profiler_libs = "";
string profiler_aot_args = "";
foreach (var profiler in profilers) {
- profiler_libs += $"$mono_sdkdir/wasm-runtime/lib/libmono-profiler-{profiler}-static.a ";
+ profiler_libs += $"$mono_sdkdir/wasm-runtime-release/lib/libmono-profiler-{profiler}-static.a ";
if (profiler_aot_args != "")
profiler_aot_args += " ";
profiler_aot_args += $"--profile={profiler}";
@@ -341,7 +341,7 @@ class Driver {
ninja.WriteLine ($"wasm_runtime_dir = {runtime_dir}");
ninja.WriteLine ($"deploy_prefix = {deploy_prefix}");
ninja.WriteLine ($"bcl_dir = {bcl_prefix}");
- ninja.WriteLine ("cross = $mono_sdkdir/wasm-cross/bin/wasm32-mono-sgen");
+ ninja.WriteLine ("cross = $mono_sdkdir/wasm-cross-release/bin/wasm32-mono-sgen");
ninja.WriteLine ("emcc = source $emscripten_sdkdir/emsdk_env.sh && emcc");
// -s ASSERTIONS=2 is very slow
ninja.WriteLine ("emcc_flags = -Os -g -s DISABLE_EXCEPTION_CATCHING=0 -s ASSERTIONS=1 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN=1 -s \"BINARYEN_TRAP_MODE=\'clamp\'\" -s TOTAL_MEMORY=134217728 -s ALIASING_FUNCTION_POINTERS=0 -s NO_EXIT_RUNTIME=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s \"EXTRA_EXPORTED_RUNTIME_METHODS=[\'ccall\', \'FS_createPath\', \'FS_createDataFile\', \'cwrap\', \'setValue\', \'getValue\', \'UTF8ToString\']\"");
@@ -425,7 +425,7 @@ class Driver {
}
}
if (enable_aot) {
- ninja.WriteLine ($"build $appdir/mono.js: emcc-link $builddir/driver.o {ofiles} {profiler_libs} $mono_sdkdir/wasm-runtime/lib/libmonosgen-2.0.a | $tool_prefix/library_mono.js $tool_prefix/binding_support.js $tool_prefix/dotnet_support.js");
+ ninja.WriteLine ($"build $appdir/mono.js: emcc-link $builddir/driver.o {ofiles} {profiler_libs} $mono_sdkdir/wasm-runtime-release/lib/libmonosgen-2.0.a $mono_sdkdir/wasm-runtime-release/lib/libmono-icall-table.a | $tool_prefix/library_mono.js $tool_prefix/binding_support.js $tool_prefix/dotnet_support.js");
}
if (enable_linker) {
string linker_args = "";