Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wasm] Add support for P/Invoke through dynamic linking #14259

Merged
merged 23 commits into from May 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
96e4e2f
Enable dynamic linking support for mono
jeromelaban Apr 26, 2019
f334609
Add EXPORT_ALL
jeromelaban Apr 26, 2019
b50d35f
Add minimal dl support
jeromelaban Apr 27, 2019
195e7f0
Add missing include
jeromelaban Apr 27, 2019
a1cda38
Workaround for second dlopen failure returns non-null
jeromelaban Apr 28, 2019
51abc92
mono emscripten double loading issue
jeromelaban Apr 29, 2019
6207844
try build release-dynamic
jeromelaban Apr 29, 2019
aaccedf
Adjust touch of the release-dynamic folder
jeromelaban Apr 29, 2019
ecd8c21
Add more driver cookies
jeromelaban Apr 29, 2019
3f303a5
Adjust release-dynamic output
jeromelaban Apr 29, 2019
935bc21
Fix indentation
jeromelaban Apr 29, 2019
c48414e
Apply fix for emscripten issue
jeromelaban Apr 29, 2019
f8371d8
Generate m2n after update
jeromelaban Apr 29, 2019
8bddfdb
Fix indentation, spacing.
jeromelaban Apr 29, 2019
b5b860f
Make libmono_icall_table_la_LIBADD and libmono_ilgen_la_LIBADD condit…
jeromelaban Apr 29, 2019
8a0e78d
Move -s MAIN_MODULE=1 to all configurations
jeromelaban Apr 30, 2019
ee66039
Make wasm dlopen use only for release-dynamic configuration
jeromelaban May 1, 2019
4c034a4
Adjust indentation
jeromelaban May 1, 2019
ca9892c
Lookup pinvoke_names in wasm_dl_load first
jeromelaban May 1, 2019
04b8dd0
Fix invalid emscripten path file name
jeromelaban May 1, 2019
21743bd
Add vifffff and viffffff trampolines
jeromelaban May 1, 2019
40981f0
Adjust indentation
jeromelaban May 1, 2019
ff4839d
Regenerate m2n trampolines
jeromelaban May 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions mono/metadata/Makefile.am
Expand Up @@ -176,9 +176,13 @@ libmono_icall_table_la_SOURCES = \
libmono_icall_table_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@
libmono_icall_table_la_LDFLAGS = $(libmonoldflags)
if BITCODE
if WASM
libmono_icall_table_la_LIBADD = # empty to avoid duplicate symbols when enabling dynamic linking
else
libmono_icall_table_la_LIBADD = $(glib_libs) ../utils/libmonoutils.la ../sgen/libmonosgen.la libmonoruntimesgen.la
endif
endif
jeromelaban marked this conversation as resolved.
Show resolved Hide resolved
endif

#
# This library contains code to generate IL at runtime
Expand All @@ -196,9 +200,13 @@ libmono_ilgen_la_SOURCES = \
libmono_ilgen_la_CFLAGS = $(SGEN_DEFINES) @CXX_ADD_CFLAGS@
libmono_ilgen_la_LDFLAGS = $(libmonoldflags)
if BITCODE
if WASM
libmono_ilgen_la_LIBADD = # empty to avoid duplicate symbols when enabling dynamic linking
else
libmono_ilgen_la_LIBADD = $(glib_libs) ../utils/libmonoutils.la ../sgen/libmonosgen.la libmonoruntimesgen.la
endif
endif
jeromelaban marked this conversation as resolved.
Show resolved Hide resolved
endif


CLEANFILES = mono-bundle.stamp
Expand Down
6 changes: 6 additions & 0 deletions mono/mini/m2n-gen.cs
Expand Up @@ -39,6 +39,10 @@ class Driver {
"VIIIIIIII",
"VIIIIIIIII",
"VIIIIIIIIII",
"VIIIIIIIIIII",
"VIIIIIIIIIIII",
"VIIIIIIIIIIIII",
"VIIIIIIIIIIIIII",
"I",
jeromelaban marked this conversation as resolved.
Show resolved Hide resolved
"II",
"III",
Expand Down Expand Up @@ -99,6 +103,8 @@ class Driver {
"VIF",
"VIFF",
"VIFFFF",
"VIFFFFF",
"VIFFFFFF",
"VIFFFFFI",
"VIIFFI",
"FF",
Expand Down